MotechListenerAbstractProxy

public abstract class MotechListenerAbstractProxy implements EventListener

Represents a MotechListener proxy, providing access to the listener’s name, bean, method. Constructed for listeners defined using annotations.

Author:yyonkov

Constructors

MotechListenerAbstractProxy

public MotechListenerAbstractProxy(String name, Object bean, Method method)
Parameters:
  • name – the unique listener identifier/key
  • bean – the bean where handler exists
  • method – the method which will be invoked when the particular event will be fired

Methods

callHandler

public abstract void callHandler(MotechEvent event)

Calls handler for the concrete proxy.

Parameters:
  • event – the event which will be handled

getBean

public Object getBean()

Returns the bean where handler exists.

Returns:the bean where handler exists

getIdentifier

public String getIdentifier()

getMethod

public Method getMethod()

Returns the handler of a event.

Returns:the method which handles a event.

handle

public void handle(MotechEvent event)