public class CommandHandlingEntry extends DisruptorUnitOfWork<org.axonframework.commandhandling.CommandMessage<?>>
| Constructor and Description |
|---|
CommandHandlingEntry()
Initializes the CommandHandlingEntry
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAggregateIdentifier()
Returns the identifier of the aggregate to recover.
|
BlacklistDetectingCallback<?,?> |
getCallback()
Returns the CommandCallback instance for the executed command.
|
org.axonframework.messaging.InterceptorChain |
getInvocationInterceptorChain()
Returns the InterceptorChain for the invocation process registered with this entry, or
null if none is
available. |
int |
getInvokerId()
Returns the Identifier of the invoker that is chosen to handle this entry.
|
int |
getPublisherId()
Returns the Identifier of the publisher that is chosen to handle this entry.
|
org.axonframework.messaging.InterceptorChain |
getPublisherInterceptorChain()
Returns the InterceptorChain for the publication process registered with this entry, or
null if none is
available. |
org.axonframework.commandhandling.CommandResultMessage<?> |
getResult()
Returns the result of the command's execution, or
null if the command is not yet executed or resulted in
an exception. |
boolean |
isRecoverEntry()
Indicates whether this entry is a recovery entry.
|
void |
registerAggregateIdentifier(String aggregateIdentifier)
Registers the identifier of the aggregate that will process the next command.
|
void |
reset(org.axonframework.commandhandling.CommandMessage<?> newCommand,
org.axonframework.messaging.MessageHandler<? super org.axonframework.commandhandling.CommandMessage<?>> newCommandHandler,
int newInvokerSegmentId,
int newPublisherSegmentId,
BlacklistDetectingCallback<?,?> newCallback,
List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>> invokerInterceptors,
List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>> publisherInterceptors)
Resets this entry, preparing it for use for another command.
|
void |
resetAsCallable(Callable<Object> callable,
int newInvokerSegmentId,
int newPublisherSegmentId,
BlacklistDetectingCallback<Object,Object> newCallback)
Resets this entry, preparing it to run given
callable from within the invocationInterceptorChain. |
void |
resetAsRecoverEntry(String newAggregateIdentifier)
Resets this entry, preparing it for use as a recovery entry.
|
void |
setResult(org.axonframework.commandhandling.CommandResultMessage<?> result)
Registers the result of the command's execution, if successful.
|
addHandler, executeWithResult, getExecutionResult, getMessage, notifyHandlers, parent, pause, reset, resume, setExecutionResult, setRollbackCause, transformMessageafterCommit, changePhase, commit, correlationDataProviders, getCorrelationData, isRolledBack, onCleanup, onCommit, onPrepareCommit, onRollback, phase, registerCorrelationDataProvider, resources, rollback, setPhase, startpublic CommandHandlingEntry()
public org.axonframework.messaging.InterceptorChain getInvocationInterceptorChain()
null if none is
available.public org.axonframework.messaging.InterceptorChain getPublisherInterceptorChain()
null if none is
available.public void setResult(org.axonframework.commandhandling.CommandResultMessage<?> result)
result - the result of the command's execution, if successfulpublic org.axonframework.commandhandling.CommandResultMessage<?> getResult()
null if the command is not yet executed or resulted in
an exception.public BlacklistDetectingCallback<?,?> getCallback()
public boolean isRecoverEntry()
true, this entry does not contain any command
handling information.true if this entry represents a recovery request, otherwise false.public String getAggregateIdentifier()
null when isRecoverEntry() returns
false.public int getInvokerId()
public int getPublisherId()
public void reset(org.axonframework.commandhandling.CommandMessage<?> newCommand,
org.axonframework.messaging.MessageHandler<? super org.axonframework.commandhandling.CommandMessage<?>> newCommandHandler,
int newInvokerSegmentId,
int newPublisherSegmentId,
BlacklistDetectingCallback<?,?> newCallback,
List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>> invokerInterceptors,
List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>> publisherInterceptors)
newCommand - The new command the entry is used fornewCommandHandler - The Command Handler responsible for handling newCommandnewInvokerSegmentId - The SegmentID of the invoker that should process this entrynewPublisherSegmentId - The SegmentID of the publisher that should process this entrynewCallback - The callback to report the result of command execution toinvokerInterceptors - The interceptors to invoke during the command handler invocation phasepublisherInterceptors - The interceptors to invoke during the publication phasepublic void resetAsRecoverEntry(String newAggregateIdentifier)
newAggregateIdentifier - The identifier of the aggregate to recoverpublic void resetAsCallable(Callable<Object> callable, int newInvokerSegmentId, int newPublisherSegmentId, BlacklistDetectingCallback<Object,Object> newCallback)
callable from within the invocationInterceptorChain.callable - a Callable which performs a task in the invocationInterceptorChain,
for example publishing a scheduled org.axonframework.deadline.DeadlineMessagenewInvokerSegmentId - The SegmentId of the invoker that should process this entrynewPublisherSegmentId - The SegmentId of the publisher that should process this entrynewCallback - The callback to report the result of command execution topublic void registerAggregateIdentifier(String aggregateIdentifier)
aggregateIdentifier - identifier of the aggregate that will handle the commandCopyright © 2010–2023. All rights reserved.