|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.core.space.filter.FilterOperationDelegate
public class FilterOperationDelegate
An ISpaceFilter
implementation that acts as an adapter
delegating the execution of the filter lifecycle methods and specific operation to pluggable
reflection based methods.
Holds a Method
representing an init callback, and one representing
close callback. Both can be null
for cases where no delegation is required.
Holds a map of FilterOperationDelegateInvoker
per operation code. Once process
is called, a
FilterOperationDelegateInvoker
is required
based on the operation code, and if found, the invocation is delegated to it.
FilterOperationDelegateInvoker
Constructor Summary | |
---|---|
FilterOperationDelegate(Object delegate,
Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> invokerLookup)
Constructs a new filter operation delegate. |
Method Summary | |
---|---|
void |
close()
If closeMethod is supplied, will invoke it. |
void |
init(com.j_spaces.core.IJSpace space,
String filterId,
String url,
int priority)
If initMethod is supplied, will invoke it. |
void |
process(com.j_spaces.core.SpaceContext context,
com.j_spaces.core.filters.entry.ISpaceFilterEntry[] entries,
int operationCode)
Fetch a FilterOperationDelegateInvoker based on the operation
code. |
void |
process(com.j_spaces.core.SpaceContext context,
com.j_spaces.core.filters.entry.ISpaceFilterEntry entry,
int operationCode)
Fetch a FilterOperationDelegateInvoker based on the operation
code. |
void |
setCloseMethod(Method closeMethod)
Sets an optional close method callback. |
void |
setInitMethod(Method initMethod)
Sets an optional init method callback. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilterOperationDelegate(Object delegate, Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> invokerLookup)
FilterOperationDelegateInvoker
.
Method Detail |
---|
public void setInitMethod(Method initMethod)
public void setCloseMethod(Method closeMethod)
public void init(com.j_spaces.core.IJSpace space, String filterId, String url, int priority) throws RuntimeException
initMethod
is supplied, will invoke it.
The method signature can have no parameters or can have a single IJSpace
.
init
in interface com.j_spaces.core.filters.ISpaceFilter
RuntimeException
public void process(com.j_spaces.core.SpaceContext context, com.j_spaces.core.filters.entry.ISpaceFilterEntry entry, int operationCode) throws RuntimeException
FilterOperationDelegateInvoker
based on the operation
code. If found, delegates to its process method.
process
in interface com.j_spaces.core.filters.ISpaceFilter
RuntimeException
public void process(com.j_spaces.core.SpaceContext context, com.j_spaces.core.filters.entry.ISpaceFilterEntry[] entries, int operationCode) throws RuntimeException
FilterOperationDelegateInvoker
based on the operation
code. If found, delegates to its process method.
process
in interface com.j_spaces.core.filters.ISpaceFilter
RuntimeException
public void close() throws RuntimeException
closeMethod
is supplied, will invoke it.
The method signature should have no parameters.
close
in interface com.j_spaces.core.filters.ISpaceFilter
RuntimeException
|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |