public class MethodFilterFactoryBean extends AbstractFilterProviderAdapterFactoryBean
FilterProvider
factory that accepts a Pojo
filter with different operation callbacks that are marked using this factory. For each available
operation there is a setter that accepts the method name to be invoked if the operation happened.
Not setting a callback means that this filter will not listen to the mentioned operation. For
example, if the filter (AbstractFilterProviderFactoryBean.setFilter(Object)
) has a method called
doSomethingBeforeWrite
, the setBeforeWrite(String)
will need to be set with
doSomethingBeforeWrite
.
The operation callback methods can different arguments. Please see FilterOperationDelegateInvoker
for all the different
possibilities.
For a Pojo adapter that uses annotation please see AnnotationFilterFactoryBean
.
FilterOperationDelegate
,
FilterProvider
,
ISpaceFilter
,
FilterOperationCodes
Constructor and Description |
---|
MethodFilterFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected Method |
doGetCloseMethod()
Returns the filter lifecycle method set with
setFilterClose(String) . |
protected Method |
doGetInitMethod()
Returns the filter lifecycle method set with
setFilterInit(String) . |
protected Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> |
doGetInvokerLookup()
Creates an operation code to filter invoker map based on the
AbstractFilterProviderFactoryBean.getFilter() delegate
and the callbacks set on this factory. |
void |
setAfterAllNotifyTrigger(String afterAllNotifyTrigger)
Filter callback after all notify trigger.
|
void |
setAfterChange(String afterChange)
Filter callback after change operation.
|
void |
setAfterExecute(String afterExecute)
Filter callback after execute operation.
|
void |
setAfterNotifyTrigger(String afterNotifyTrigger)
Filter callback after notify trigger.
|
void |
setAfterRead(String afterRead)
Filter callback after read operation.
|
void |
setAfterReadMultiple(String afterReadMultiple)
Filter callback after read multiple operation.
|
void |
setAfterRemoveByLease(String afterRemoveByLease)
Filter callback after an entry was removed due to lease expression or lease cancel.
|
void |
setAfterTake(String afterTake)
Filter callback after take operation.
|
void |
setAfterTakeMultiple(String afterTakeMultiple)
Filter callback after take multiple operation.
|
void |
setAfterUpdate(String afterUpdate)
Filter callback after update operation.
|
void |
setAfterWrite(String afterWrite)
Filter callback after write operation.
|
void |
setBeforeAllNotifyTrigger(String beforeAllNotifyTrigger)
Filter callback before all notify trigger.
|
void |
setBeforeAuthentication(String beforeAuthentication)
Filter callback before authentication operation.
|
void |
setBeforeChange(String beforeChange)
Filter callback before change operation.
|
void |
setBeforeCleanSpace(String beforeCleanSpace)
Filter callback after clean space operation.
|
void |
setBeforeExecute(String beforeExecute)
Filter callback before execute operation.
|
void |
setBeforeNotify(String beforeNotify)
Filter callback before notify operation.
|
void |
setBeforeNotifyTrigger(String beforeNotifyTrigger)
Filter callback before notify trigger.
|
void |
setBeforeRead(String beforeRead)
Filter callback before read operation.
|
void |
setBeforeReadMultiple(String beforeReadMultiple)
Filter callback before read multiple operation.
|
void |
setBeforeRemoveByLease(String beforeRemoveByLease)
Filter callback before an entry was removed due to lease expression or lease cancel.
|
void |
setBeforeTake(String beforeTake)
Filter callback before take operation.
|
void |
setBeforeTakeMultiple(String beforeTakeMultiple)
Filter callback before take multiple operation.
|
void |
setBeforeUpdate(String beforeUpdate)
Filter callback before update operation.
|
void |
setBeforeWrite(String beforeWrite)
Filter callback before write operation.
|
void |
setFilterClose(String filterClose)
Method name for filter lifecycle close callback.
|
void |
setFilterInit(String filterInit)
Method name for filter lifecycle init callback.
|
addInvoker, doGetFilterProvider
afterPropertiesSet, getBeanName, getFilter, getFilterProvider, setActiveWhenBackup, setBeanName, setEnabled, setFilter, setPriority, setSecurityFilter, setShutdownSpaceOnInitFailure
protected Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> doGetInvokerLookup()
AbstractFilterProviderFactoryBean.getFilter()
delegate
and the callbacks set on this factory.doGetInvokerLookup
in class AbstractFilterProviderAdapterFactoryBean
protected Method doGetInitMethod()
setFilterInit(String)
.doGetInitMethod
in class AbstractFilterProviderAdapterFactoryBean
protected Method doGetCloseMethod()
setFilterClose(String)
.doGetCloseMethod
in class AbstractFilterProviderAdapterFactoryBean
public void setFilterInit(String filterInit)
IJSpace
.public void setFilterClose(String filterClose)
public void setBeforeWrite(String beforeWrite)
FilterOperationCodes.BEFORE_WRITE
public void setBeforeAuthentication(String beforeAuthentication)
SpaceContext
.public void setAfterWrite(String afterWrite)
FilterOperationCodes.AFTER_WRITE
public void setBeforeRead(String beforeRead)
FilterOperationCodes.BEFORE_READ
public void setAfterRead(String afterRead)
FilterOperationCodes.AFTER_READ
public void setBeforeTake(String beforeTake)
FilterOperationCodes.BEFORE_TAKE
public void setAfterTake(String afterTake)
FilterOperationCodes.AFTER_TAKE
public void setBeforeNotify(String beforeNotify)
FilterOperationCodes.BEFORE_NOTIFY
public void setBeforeCleanSpace(String beforeCleanSpace)
FilterOperationCodes.BEFORE_CLEAN_SPACE
public void setBeforeUpdate(String beforeUpdate)
FilterOperationCodes.BEFORE_UPDATE
public void setAfterUpdate(String afterUpdate)
FilterOperationCodes.AFTER_UPDATE
public void setBeforeReadMultiple(String beforeReadMultiple)
public void setAfterReadMultiple(String afterReadMultiple)
FilterOperationCodes.AFTER_READ_MULTIPLE
public void setBeforeTakeMultiple(String beforeTakeMultiple)
public void setAfterTakeMultiple(String afterTakeMultiple)
FilterOperationCodes.AFTER_TAKE_MULTIPLE
public void setBeforeNotifyTrigger(String beforeNotifyTrigger)
public void setAfterNotifyTrigger(String afterNotifyTrigger)
public void setBeforeAllNotifyTrigger(String beforeAllNotifyTrigger)
public void setAfterAllNotifyTrigger(String afterAllNotifyTrigger)
public void setBeforeRemoveByLease(String beforeRemoveByLease)
FilterOperationCodes.BEFORE_REMOVE
public void setAfterRemoveByLease(String afterRemoveByLease)
FilterOperationCodes.AFTER_REMOVE
public void setBeforeExecute(String beforeExecute)
FilterOperationCodes.BEFORE_EXECUTE
public void setAfterExecute(String afterExecute)
FilterOperationCodes.AFTER_EXECUTE
public void setBeforeChange(String beforeChange)
FilterOperationCodes.BEFORE_CHANGE
public void setAfterChange(String afterChange)
FilterOperationCodes.AFTER_CHANGE
Copyright © GigaSpaces.