Interface ReactorCommandGateway
- All Superinterfaces:
DescribableComponent
- All Known Implementing Classes:
DefaultReactorCommandGateway
Reactor command gateway that runs dispatch interceptors inside the Reactor subscription.
Use this instead of CommandGateway when interceptors
need access to Reactor context (e.g., ReactiveSecurityContextHolder).
The interceptor chain is built and executed within the Reactor subscription, ensuring that the Reactor
Context is available throughout the entire dispatch pipeline.
- Since:
- 4.4.2
- Author:
- Milan Savic, Theo Emanuelsson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Mono<Void> Sends the givencommandand returns aMonothat completes when the command is handled.default <R> reactor.core.publisher.Mono<R> Sends the givencommandand returns aMonowith the typed result.<R> reactor.core.publisher.Mono<R> send(Object command, Class<R> resultType, @Nullable ProcessingContext context) Sends the givencommandin the providedcontext(if available) and returns aMonowith the typed result.reactor.core.publisher.Mono<Void> send(Object command, @Nullable ProcessingContext context) Sends the givencommandin the providedcontext(if available) and returns aMonothat completes when the command is handled.Methods inherited from interface org.axonframework.common.infra.DescribableComponent
describeTo
-
Method Details
-
send
<R> reactor.core.publisher.Mono<R> send(Object command, Class<R> resultType, @Nullable ProcessingContext context) Sends the givencommandin the providedcontext(if available) and returns aMonowith the typed result.- Type Parameters:
R- the result type- Parameters:
command- the command payload to sendresultType- the expected result typecontext- the processing context, if any, to dispatch the givencommandin- Returns:
- a
Monocompleting with the command result
-
send
Sends the givencommandand returns aMonowith the typed result.- Type Parameters:
R- the result type- Parameters:
command- the command payload to sendresultType- the expected result type- Returns:
- a
Monocompleting with the command result - See Also:
-
send
Sends the givencommandin the providedcontext(if available) and returns aMonothat completes when the command is handled.- Parameters:
command- the command payload to sendcontext- the processing context, if any, to dispatch the givencommandin- Returns:
- a
Monocompleting when the command is handled
-
send
Sends the givencommandand returns aMonothat completes when the command is handled.- Parameters:
command- the command payload to send- Returns:
- a
Monocompleting when the command is handled - See Also:
-