@CompileStatic class CommandGatewayAdapter extends Object
Simplifies the API usage and exception handling of Axon CommandGateway
.
Constructor and description |
---|
CommandGatewayAdapter(CommandGateway commandGateway) |
Type Params | Return Type | Name and description |
---|---|---|
<R, C> |
R |
sendAndWait(C command) Delegates calls to the CommandGateway.sendAndWait() method with null metaData. |
<R, C> |
R |
sendAndWait(C command, Map metaData) Delegates calls to the CommandGateway.sendAndWait() method.
|
Delegates calls to the CommandGateway.sendAndWait()
method with null metaData.
CommandExecutionException
.command
- The command to dispatch.R
- The type of result expected from command execution. Delegates calls to the CommandGateway.sendAndWait()
method.
CommandGateway
, it unwraps details exception (if available), and rethrows it to the caller.CommandExecutionException
.command
- The command to dispatch.metaData
- The metadata map to dispatch with the command.R
- The type of result expected from command execution.