org.axonframework.eventhandling.annotation
Class AnnotationEventHandlerInvoker

java.lang.Object
  extended by org.axonframework.util.AbstractHandlerInspector
      extended by org.axonframework.util.AbstractHandlerInvoker
          extended by org.axonframework.eventhandling.annotation.AnnotationEventHandlerInvoker

public class AnnotationEventHandlerInvoker
extends AbstractHandlerInvoker

Utility class that supports invocation of specific handler methods for a given event. See EventHandler for the rules for resolving the appropriate method.

Since:
0.1
Author:
Allard Buijze
See Also:
EventHandler

Constructor Summary
AnnotationEventHandlerInvoker(Object target)
          Initialize an event handler invoker that invokes handlers on the given target
 
Method Summary
 void invokeAfterTransaction(TransactionStatus transactionStatus)
          Invoke the "AfterTransaction" method on the target.
 void invokeBeforeTransaction(TransactionStatus transactionStatus)
          Invoke the "BeforeTransaction" method on the target.
 void invokeEventHandlerMethod(Event event)
          Invoke the event handler on the target for the given event
 
Methods inherited from class org.axonframework.util.AbstractHandlerInvoker
getTarget, invokeHandlerMethod, invokeHandlerMethod, onNoMethodFound
 
Methods inherited from class org.axonframework.util.AbstractHandlerInspector
findHandlerMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationEventHandlerInvoker

public AnnotationEventHandlerInvoker(Object target)
Initialize an event handler invoker that invokes handlers on the given target

Parameters:
target - the bean on which to invoke event handlers
Method Detail

invokeEventHandlerMethod

public void invokeEventHandlerMethod(Event event)
Invoke the event handler on the target for the given event

Parameters:
event - the event to handle

invokeBeforeTransaction

public void invokeBeforeTransaction(TransactionStatus transactionStatus)
Invoke the "BeforeTransaction" method on the target. This is the method annotated with BeforeTransaction

Parameters:
transactionStatus - The status of the transaction to pass as parameter to the method call

invokeAfterTransaction

public void invokeAfterTransaction(TransactionStatus transactionStatus)
Invoke the "AfterTransaction" method on the target. This is the method annotated with AfterTransaction

Parameters:
transactionStatus - The status of the transaction to pass as parameter to the method call


Copyright © 2011. All Rights Reserved.