|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.saga.annotation.SagaMethodMessageHandler
public class SagaMethodMessageHandler
A data holder containing information of SagaEventHandler annotated methods.
| Constructor Summary | |
|---|---|
protected |
SagaMethodMessageHandler(SagaCreationPolicy creationPolicy,
MethodMessageHandler handler,
String associationKey,
Method associationProperty)
Creates a SagaMethodMessageHandler. |
| Method Summary | |
|---|---|
int |
compareTo(SagaMethodMessageHandler o)
|
boolean |
equals(Object o)
|
AssociationValue |
getAssociationValue(EventMessage eventMessage)
The AssociationValue to find the saga instance with, or null if no AssociationValue can be found on
the given eventMessage. |
SagaCreationPolicy |
getCreationPolicy()
Returns the creation policy of the inspected method. |
static SagaMethodMessageHandler |
getInstance(MethodMessageHandler methodHandler)
Create a SagaMethodMessageHandler for the given methodHandler. |
int |
hashCode()
|
boolean |
isHandlerAvailable()
Indicates whether the inspected method is an Event Handler. |
boolean |
matches(EventMessage message)
Indicates whether this Handler is suitable for the given message. |
static SagaMethodMessageHandler |
noHandler()
Returns a SagaMethodMessageHandler indicating that a inspected method is *not* a SagaEventHandler. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SagaMethodMessageHandler(SagaCreationPolicy creationPolicy,
MethodMessageHandler handler,
String associationKey,
Method associationProperty)
creationPolicy - The creation policy for the handlerMethodhandler - The handler for the eventassociationKey - The association key configured for this handlerassociationProperty - The association property configured for this handler| Method Detail |
|---|
public static SagaMethodMessageHandler noHandler()
public static SagaMethodMessageHandler getInstance(MethodMessageHandler methodHandler)
methodHandler. The SagaMethodMessageHandler add
information specific to the behavior of Sagas, such as the association value and creation policy.
methodHandler - The handler for incoming events
public boolean isHandlerAvailable()
public AssociationValue getAssociationValue(EventMessage eventMessage)
null if no AssociationValue can be found on
the given eventMessage.
eventMessage - The event message containing the value of the association
null if none foundpublic SagaCreationPolicy getCreationPolicy()
public boolean matches(EventMessage message)
message.
message - The message to inspect
true if this handler can handle the message, otherwise false.public int compareTo(SagaMethodMessageHandler o)
compareTo in interface Comparable<SagaMethodMessageHandler>public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||