|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.util.AbstractHandlerInspector
org.axonframework.util.AbstractHandlerInvoker
public abstract class AbstractHandlerInvoker
Abstract class to support implementations that need to invoke methods based on an annotation.
| Constructor Summary | |
|---|---|
AbstractHandlerInvoker(Object target,
Class<? extends Annotation> annotationType)
Initialize a handler invoker for the given target object that has handler method annotated with
given annotationType. |
|
| Method Summary | |
|---|---|
Object |
getTarget()
Returns the target on which handler methods are invoked. |
protected Object |
invokeHandlerMethod(Object parameter)
Invoke the handler demarcated with the given annotationClass on the target for the given
event. |
protected Object |
invokeHandlerMethod(Object parameter,
Object secondHandlerParameter)
Invoke the handler demarcated with the given annotationClass on the target for the given
event and an optional secondHandlerParameter. |
protected Object |
onNoMethodFound(Class<?> parameterType)
Indicates what needs to happen when no handler is found for a given parameter. |
| 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 |
|---|
public AbstractHandlerInvoker(Object target,
Class<? extends Annotation> annotationType)
target object that has handler method annotated with
given annotationType.
target - The target to invoke methods onannotationType - The type of annotation used to demarcate the handler methods| Method Detail |
|---|
protected Object invokeHandlerMethod(Object parameter)
throws InvocationTargetException,
IllegalAccessException
annotationClass on the target for the given
event.
parameter - the event to handle
IllegalAccessException - When a security policy prevents invocation using reflection
InvocationTargetException - If the handler method threw an exception
protected Object invokeHandlerMethod(Object parameter,
Object secondHandlerParameter)
throws InvocationTargetException,
IllegalAccessException
annotationClass on the target for the given
event and an optional secondHandlerParameter.
parameter - the event to handlesecondHandlerParameter - An optional second parameter allowed on the annotated method
IllegalAccessException - When a security policy prevents invocation using reflection
InvocationTargetException - If the handler method threw an exceptionprotected Object onNoMethodFound(Class<?> parameterType)
Void.TYPE.
parameterType - The type of parameter for which no handler could be found
Void.TYPE.public Object getTarget()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||