OverviewA Space Filter is a special hook point inside the engine that enables integration with external systems, or implementation of user defined logic. There are two ways to implement such a filter and integrate it with the space, both of which are covered in this page.
Integrating the Space Filter with a SpaceA space filter is integrated into a space upon creation of that space. Each space filter that integrates with a space, needs a SpaceFilterConfig instance that defines it. A SpaceFilterConfig can be created in two ways, depending on the implementation of the filter itself. Implementing the ISpaceFilter InterfaceIf the filter implements the ISpaceFilter Interface, then a SpaceFilterConfig needs to be created for it, and each operation that needs to be filtered should be added to the FilterOperations list, as in the following code: SpaceFilterConfig mySpaceFilterConfig = new SpaceFilterConfig(); mySpaceFilterConfig.FilterOperations = new List<FilterOperation>(new FilterOperation[]{ FilterOperation.BeforeWrite }); mySpaceFilterConfig.Filter = new MySpaceFilter(); Implementing a Space Filter using SpaceFilterOperationDelegateIf the filter is based on the SpaceFilterOperationDelegate, then a SpaceFilterConfig needs to be created. This is done with the appropriate SpaceFilterConfigFactory, either AttributeSpaceFilterConfigFactory, or MethodNameSpaceFilterConfigFactory, using the CreateSpaceFilterConfig() method. Once a SpaceFilterConfig is created, it needs to be used when starting the space. spaceConfig.SpaceFiltersConfig = new List<SpaceFilterConfig>(); spaceConfig.Add(mySpaceFilterConfig); ISpaceProxy embeddedSpace = SpaceProxyProviderFactory.Instance.FindSpace("/./mySpace", spaceConfig);
|
![]() |
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence |