T
- The saga typepublic interface SagaModel<T>
T
. Use the SagaModel to obtain associations and
event handlers for the Saga.Modifier and Type | Method and Description |
---|---|
List<MessageHandlingMember<? super T>> |
findHandlerMethods(EventMessage<?> event)
Returns a
List of MessageHandlingMember that can handle the given event. |
default boolean |
hasHandlerMethod(EventMessage<?> eventMessage)
Indicates whether the Saga described by this model has a handler for the given
eventMessage |
SagaMetaModelFactory |
modelFactory()
Returns the factory that created this model.
|
Optional<AssociationValue> |
resolveAssociation(EventMessage<?> eventMessage)
|
Optional<AssociationValue> resolveAssociation(EventMessage<?> eventMessage)
AssociationValue
used to find sagas of type T
that can handle the given eventMessage
. If the saga type does not handle events of this type an empty Optional is returned.eventMessage
- The event to find the association value forList<MessageHandlingMember<? super T>> findHandlerMethods(EventMessage<?> event)
List
of MessageHandlingMember
that can handle the given event.event
- The EventMessage
to be handledevent
default boolean hasHandlerMethod(EventMessage<?> eventMessage)
eventMessage
eventMessage
- The message to check the availability of a handler fortrue
if there the Saga has a handler for this message, otherwise false
SagaMetaModelFactory modelFactory()
Copyright © 2010–2023. All rights reserved.