org.axonframework.common.annotation
Interface HandlerDefinition<T extends AccessibleObject>

Type Parameters:
T - The type of member supported by this handler
All Known Implementing Classes:
AbstractAnnotatedHandlerDefinition

public interface HandlerDefinition<T extends AccessibleObject>

Defines which members (methods, constructors, etc) are considered message handlers. A typical approach is by adding an annotation on the method, but it is certainly not limited to that approach.

Since:
2.1
Author:
Allard Buijze

Method Summary
 boolean isMessageHandler(T member)
          Indicates whether the given member is to be considered a message handler
 Class<?> resolvePayloadFor(T member)
          Returns the explicitly defined payload of supported messages on the given member
 

Method Detail

isMessageHandler

boolean isMessageHandler(T member)
Indicates whether the given member is to be considered a message handler

Parameters:
member - The member to verify
Returns:
true if the given member is a message handler, otherwise false

resolvePayloadFor

Class<?> resolvePayloadFor(T member)
Returns the explicitly defined payload of supported messages on the given member

Parameters:
member - the member method
Returns:
the explicitly configured payload type, or null if the payload must be deducted from the handler's parameters


Copyright © 2010-2016. All Rights Reserved.