com.googlecode.sarasvati.event
Class ExecutionListenerWrapper

java.lang.Object
  extended by com.googlecode.sarasvati.event.ExecutionListenerWrapper
All Implemented Interfaces:
ExecutionListener

public class ExecutionListenerWrapper
extends Object
implements ExecutionListener

Useful for avoiding hibernate proxy behavior. If a node implements ExecutionListener, it can return new ExecutionListenerWrapper( this ) from Adaptable.getAdaptor(Class), and the proxy will not break.

Author:
Paul Lorenz

Constructor Summary
ExecutionListenerWrapper(ExecutionListener listener)
           
 
Method Summary
 ExecutionListener getListener()
           
 EventActions notify(ExecutionEvent event)
          Invoked by the Engine when an event of a type that this listener has register for occurs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionListenerWrapper

public ExecutionListenerWrapper(ExecutionListener listener)
Method Detail

getListener

public ExecutionListener getListener()

notify

public EventActions notify(ExecutionEvent event)
Description copied from interface: ExecutionListener
Invoked by the Engine when an event of a type that this listener has register for occurs. May return an EventActions defining the actions to be performed or null.

Specified by:
notify in interface ExecutionListener
Parameters:
event - The event which has just occurred.
Returns:
EventActions The set of requested EventActionTypes or null.