|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.saga.annotation.AbstractAnnotatedSaga
public abstract class AbstractAnnotatedSaga
Implementation of the interface
that delegates incoming events to @SagaEventHandler
annotated methods.
Constructor Summary | |
---|---|
protected |
AbstractAnnotatedSaga()
Initialize the saga with a random identifier. |
protected |
AbstractAnnotatedSaga(String identifier)
Initialize the saga with the given identifier. |
Method Summary | |
---|---|
protected void |
associateWith(AssociationValue property)
Registers a AssociationValue with the given saga. |
protected void |
associateWith(String key,
Number value)
Registers a AssociationValue with the given saga. |
protected void |
associateWith(String key,
String value)
Registers a AssociationValue with the given saga. |
protected void |
end()
Marks the saga as ended. |
AssociationValues |
getAssociationValues()
Returns a view on the Association Values for this saga instance. |
String |
getSagaIdentifier()
Returns the unique identifier of this saga. |
void |
handle(EventMessage event)
Handle the given event. |
boolean |
isActive()
Indicates whether or not this saga is active. |
protected void |
registerParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
Sets the ParameterResolverFactory for this instance to use. |
protected void |
removeAssociationWith(AssociationValue property)
Removes the given association from this Saga. |
protected void |
removeAssociationWith(String key,
Number value)
Removes the given association from this Saga. |
protected void |
removeAssociationWith(String key,
String value)
Removes the given association from this Saga. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractAnnotatedSaga()
IdentifierFactory.generateIdentifier()
, which defaults to a randomly generated UUID
.
protected AbstractAnnotatedSaga(String identifier)
identifier
- the identifier to initialize the saga with.Method Detail |
---|
public String getSagaIdentifier()
Saga
getSagaIdentifier
in interface Saga
public AssociationValues getAssociationValues()
Saga
getAssociationValues
in interface Saga
public final void handle(EventMessage event)
Saga
handle
in interface Saga
event
- the event to handleprotected void registerParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
parameterResolverFactory
- The parameterResolverFactory for this instance to usepublic boolean isActive()
Saga
isActive
in interface Saga
true
if this saga is active, false
otherwise.protected void end()
protected void associateWith(AssociationValue property)
property
- The value to associate this saga with.protected void associateWith(String key, String value)
key
- The key of the association value to associate this saga with.value
- The value of the association value to associate this saga with.protected void associateWith(String key, Number value)
key
- The key of the association value to associate this saga with.value
- The value of the association value to associate this saga with.protected void removeAssociationWith(AssociationValue property)
property
- the association value to remove from the saga.protected void removeAssociationWith(String key, String value)
key
- The key of the association value to remove from this saga.value
- The value of the association value to remove from this saga.protected void removeAssociationWith(String key, Number value)
key
- The key of the association value to remove from this saga.value
- The value of the association value to remove from this saga.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |