GigaSpaces XAP 9.7.2 API

org.openspaces.events.adapter
Class MethodEventListenerAdapter

java.lang.Object
  extended by org.openspaces.events.adapter.AbstractResultEventListenerAdapter
      extended by org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter
          extended by org.openspaces.events.adapter.MethodEventListenerAdapter
All Implemented Interfaces:
EventListenerAdapter, SpaceDataEventListener, InitializingBean

public class MethodEventListenerAdapter
extends AbstractReflectionEventListenerAdapter

The method event listener adapter allows to configure the method name (using setMethodName(String) that the event will be delegated to. The default method name is handleEvent.

Author:
kimchy

Field Summary
static String DEFAULT_LISTENER_METHOD_NAME
          Default method name to delegate to: handleEvent.
 
Fields inherited from class org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter
logger
 
Constructor Summary
MethodEventListenerAdapter()
           
 
Method Summary
protected  Method[] doGetListenerMethods()
          Returns a list of all the methods names that match the configured setMethodName(String).
 void setMethodName(String methodName)
          Sets the method name the event listener adapter will delegate the events to.
 
Methods inherited from class org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter
afterPropertiesSet, getActualEventListener, getDelegate, onEventWithResult, setDelegate, setUseFastReflection
 
Methods inherited from class org.openspaces.events.adapter.AbstractResultEventListenerAdapter
handleResult, onEvent, setUpdateOrWrite, setUpdateTimeout, setWriteLease
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LISTENER_METHOD_NAME

public static final String DEFAULT_LISTENER_METHOD_NAME
Default method name to delegate to: handleEvent.

See Also:
Constant Field Values
Constructor Detail

MethodEventListenerAdapter

public MethodEventListenerAdapter()
Method Detail

setMethodName

public void setMethodName(String methodName)
Sets the method name the event listener adapter will delegate the events to.

Parameters:
methodName - The method name events will be delegated to

doGetListenerMethods

protected Method[] doGetListenerMethods()
Returns a list of all the methods names that match the configured setMethodName(String).

Specified by:
doGetListenerMethods in class AbstractReflectionEventListenerAdapter
Returns:
A list of all the event listener delegate methods

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.