org.axonframework.saga.annotation
Class SagaEventHandlerInvoker

java.lang.Object
  extended by org.axonframework.saga.annotation.SagaEventHandlerInvoker

public class SagaEventHandlerInvoker
extends Object

Utility class that invokes annotated Event Handlers on Sagas.

Since:
0.7
Author:
Allard Buijze

Constructor Summary
SagaEventHandlerInvoker(Object target)
          Initialize a handler invoker for the given target object that has handler method annotated with given annotationType.
 
Method Summary
 void invokeSagaEventHandlerMethod(EventMessage event)
          Invoke the annotated Event Handler method for the given event on the target Saga.
 boolean isEndingEvent(EventMessage event)
          Indicates whether the handler of the target event indicates an ending event handler (i.e. is annotated with EndSaga).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SagaEventHandlerInvoker

public SagaEventHandlerInvoker(Object target)
Initialize a handler invoker for the given target object that has handler method annotated with given annotationType.

Parameters:
target - The target to invoke methods on
Method Detail

isEndingEvent

public boolean isEndingEvent(EventMessage event)
Indicates whether the handler of the target event indicates an ending event handler (i.e. is annotated with EndSaga).

Parameters:
event - The event to investigate the handler for
Returns:
true if handling the given event should end the lifecycle of the Saga, false otherwise.

invokeSagaEventHandlerMethod

public void invokeSagaEventHandlerMethod(EventMessage event)
Invoke the annotated Event Handler method for the given event on the target Saga.

Parameters:
event - The event to invoke the Event Handler for


Copyright © 2010-2012. All Rights Reserved.