Package com.gigaspaces.security.spring
Class SecurityFilter
java.lang.Object
com.gigaspaces.security.spring.SecurityFilter
- All Implemented Interfaces:
ISpaceFilter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this filter, enabling the developer to clean open resources.int[]voidInitializes this filter.voidprocess(SpaceContext context, ISpaceFilterEntry[] entries, int operationCode) This method is called by the engine when an event matching this filter's operation code occurs in the engine.voidprocess(SpaceContext context, ISpaceFilterEntry entry, int operationCode) This method is called by the engine when an event matching this filter's operation code occurs in the space engine.
-
Constructor Details
-
SecurityFilter
public SecurityFilter()
-
-
Method Details
-
init
Description copied from interface:ISpaceFilterInitializes this filter.- Specified by:
initin interfaceISpaceFilter- Parameters:
space- an embedded proxy to the space that contain this filter.filterId- the name of this filter.url- The URL that was passed when this filter was created.priority- defines the order in which filters are activated.- Throws:
RuntimeException- if this exception is raised, the filter will be discarded by the engine for the current engine execution ,unless defined otherwise in space configuration.
-
getOpCodes
public int[] getOpCodes() -
process
public void process(SpaceContext context, ISpaceFilterEntry entry, int operationCode) throws RuntimeException Description copied from interface:ISpaceFilterThis method is called by the engine when an event matching this filter's operation code occurs in the space engine. Only for SecurityFilter implementation: On SET_SECURITY operation code call SpaceContext.setSecurityContext().
- Specified by:
processin interfaceISpaceFilter- Parameters:
context- the Context passed by the caller, contains security context. some of the filters (like ON_INIT) will always receive a null context.entry- the event that occurred.operationCode- the operation that defines when this filter is activated. The operation codes are defined inFilterOperationCodes.- Throws:
RuntimeException- if this exception is raised for BEFORE filters, it aborts the execution of the operation.
-
process
public void process(SpaceContext context, ISpaceFilterEntry[] entries, int operationCode) throws RuntimeException Description copied from interface:ISpaceFilterThis method is called by the engine when an event matching this filter's operation code occurs in the engine.Notice: This is a special case that is called only on
update()only onAFTER_UPDATE.
Also onBEFORE_NOTIFY_TRIGGERandAFTER_NOTIFY_TRIGGER.- Specified by:
processin interfaceISpaceFilter- Parameters:
context- the Context passed by the caller, contains security context. some of the filters (like ON_INIT) will always receive a null context.entries- an array of two elements:On
AFTER_UPDATE: the first element represents the old entry while the second is the new entry.On
BEFORE_NOTIFY_TRIGGERandAFTER_NOTIFY_TRIGGER: the first element represents the entry while the second is the template.operationCode- the operation that defines when this filter is activated. The operation codes are defined inFilterOperationCodes.- Throws:
RuntimeException- if this exception is raised for BEFORE filters,
-
close
Description copied from interface:ISpaceFilterCloses this filter, enabling the developer to clean open resources.- Specified by:
closein interfaceISpaceFilter- Throws:
RuntimeException- if this exception is raised it will be logged. This should be used as away to report a filter internal error.
-