DefaultCommandGateway
The command gateway: a facade that puts admission in front of a CommandBus it does not own.
Every send goes through one admission chain (CommandAdmission): validate, check the request ID, and, for a wait, register the wait handle and build the message with its wait headers. The SENT signal is produced in one place (sendAdmitted), after the bus accepted or rejected the message, and handed to whoever waits for it. Every wait is bounded by one deadline implementation (WaitDeadline).
receiver delegates to commandBus. close releases only the gateway's own deadline timer: the bus has its own owner (in Spring, its own bean) and is closed by it.
Parameters
The endpoint wait signals for this node are sent to.
The underlying command bus the admitted commands are sent through.
The validator for command bodies.
Checker for command request ID idempotency.
Coordinator for managing wait handles.
Notifier for the SENT signal of a command that carries an upstream wait plan.
Constructors
Functions
The one receive entry: a single message source for subscription, with an explicit transport readiness boundary and processing admission (see MessageReceiver).
Sends a command through the admission chain. When the message carries the wait plan of an upstream command (a command a saga sends for a waiting chain), its SENT signal, or its admission failure, goes to that plan.
Sends a command and waits for the result of the waited stage.
Sends a command and completes with the SENT stage result as soon as the command bus accepts it, without registering a wait handle or writing wait headers: no stage after SENT is waited on. Bounded by the default command wait timeout.
Sends a command and streams its results as the waited stages report them.