|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.commandhandling.gateway.AbstractCommandGateway
public abstract class AbstractCommandGateway
Abstract implementation of a CommandGateway, which handles the dispatch interceptors and retrying on failure. The actual dispatching of commands is left to the subclasses.
Constructor Summary | |
---|---|
protected |
AbstractCommandGateway(CommandBus commandBus,
RetryScheduler retryScheduler,
List<CommandDispatchInterceptor> commandDispatchInterceptors)
Initialize the AbstractCommandGateway with given commandBus , retryScheduler and
commandDispatchInterceptors . |
Method Summary | ||
---|---|---|
protected CommandMessage |
processInterceptors(CommandMessage commandMessage)
Invokes all the dispatch interceptors and returns the CommandMessage instance that should be dispatched. |
|
protected
|
send(Object command,
CommandCallback<R> callback)
Sends the given command , and invokes the callback when the command is processed. |
|
protected void |
sendAndForget(Object command)
Dispatches a command without callback. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractCommandGateway(CommandBus commandBus, RetryScheduler retryScheduler, List<CommandDispatchInterceptor> commandDispatchInterceptors)
commandBus
, retryScheduler
and
commandDispatchInterceptors
.
commandBus
- The command bus on which to dispatch eventsretryScheduler
- The scheduler capable of performing retries of failed commands. May be
null
when to prevent retries.commandDispatchInterceptors
- The interceptors to invoke when dispatching a commandMethod Detail |
---|
protected <R> void send(Object command, CommandCallback<R> callback)
command
, and invokes the callback
when the command is processed.
R
- The type of response expected from the commandcommand
- The command to dispatchcallback
- The callback to notify with the processing resultprotected void sendAndForget(Object command)
command
- The command to dispatchprotected CommandMessage processInterceptors(CommandMessage commandMessage)
commandMessage
- The incoming command message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |