GigaSpaces XAP 9.0 API

org.openspaces.core.space.filter
Class AbstractFilterProviderAdapterFactoryBean

java.lang.Object
  extended by org.openspaces.core.space.filter.AbstractFilterProviderFactoryBean
      extended by org.openspaces.core.space.filter.AbstractFilterProviderAdapterFactoryBean
All Implemented Interfaces:
FilterProviderFactory, Aware, BeanNameAware, InitializingBean
Direct Known Subclasses:
AnnotationFilterFactoryBean, MethodFilterFactoryBean

public abstract class AbstractFilterProviderAdapterFactoryBean
extends AbstractFilterProviderFactoryBean

A base class for filter adapters that delegate the invocation of filter operation and lifecycle methods to another class. The delegate invocation is done using FilterOperationDelegate.

Subclasses should implement three methods. The first, doGetInvokerLookup() provides a map of operation per FilterOperationDelegateInvoker. The other two provide filter lifecycle methods doGetInitMethod() and doGetCloseMethod().

Author:
kimchy
See Also:
FilterOperationDelegate

Constructor Summary
AbstractFilterProviderAdapterFactoryBean()
           
 
Method Summary
protected  void addInvoker(Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> invokerLookup, Method method, int operationCode)
          Helper method for basclasses that add an invoker to the lookup map.
protected abstract  Method doGetCloseMethod()
          Retruns the filter lifecycle close method delegate.
protected  com.j_spaces.core.filters.FilterProvider doGetFilterProvider()
          Constructs a new FilterProvider using FilterOperationDelegate as the ISpaceFilter implementation.
protected abstract  Method doGetInitMethod()
          Retruns the filter lifecycle init method delegate.
protected abstract  Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> doGetInvokerLookup()
          Responsible for returning a lookup map of operation code to invoker.
 
Methods inherited from class org.openspaces.core.space.filter.AbstractFilterProviderFactoryBean
afterPropertiesSet, getBeanName, getFilter, getFilterProvider, setActiveWhenBackup, setBeanName, setEnabled, setFilter, setPriority, setSecurityFilter, setShutdownSpaceOnInitFailure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilterProviderAdapterFactoryBean

public AbstractFilterProviderAdapterFactoryBean()
Method Detail

doGetFilterProvider

protected com.j_spaces.core.filters.FilterProvider doGetFilterProvider()
                                                                throws IllegalArgumentException

Constructs a new FilterProvider using FilterOperationDelegate as the ISpaceFilter implementation.

Subclasses should provide the main Map of operation per FilterOperationDelegateInvoker which is used to initialize the FilterOperationDelegate.

Specified by:
doGetFilterProvider in class AbstractFilterProviderFactoryBean
Throws:
IllegalArgumentException

addInvoker

protected void addInvoker(Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> invokerLookup,
                          Method method,
                          int operationCode)
                   throws IllegalArgumentException
Helper method for basclasses that add an invoker to the lookup map. Performs validation that no other invoker is bounded to the operation code.

Throws:
IllegalArgumentException

doGetInvokerLookup

protected abstract Map<Integer,org.openspaces.core.space.filter.FilterOperationDelegateInvoker> doGetInvokerLookup()
Responsible for returning a lookup map of operation code to invoker.


doGetInitMethod

protected abstract Method doGetInitMethod()
Retruns the filter lifecycle init method delegate. Can be null.


doGetCloseMethod

protected abstract Method doGetCloseMethod()
Retruns the filter lifecycle close method delegate. Can be null.


GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.