All Superinterfaces:
DescribableComponent
All Known Implementing Classes:
DefaultReactorCommandGateway

public interface ReactorCommandGateway extends DescribableComponent
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 Type
    Method
    Description
    default reactor.core.publisher.Mono<Void>
    send(Object command)
    Sends the given command and returns a Mono that completes when the command is handled.
    default <R> reactor.core.publisher.Mono<R>
    send(Object command, Class<R> resultType)
    Sends the given command and returns a Mono with the typed result.
    <R> reactor.core.publisher.Mono<R>
    send(Object command, Class<R> resultType, @Nullable ProcessingContext context)
    Sends the given command in the provided context (if available) and returns a Mono with the typed result.
    reactor.core.publisher.Mono<Void>
    send(Object command, @Nullable ProcessingContext context)
    Sends the given command in the provided context (if available) and returns a Mono that 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 given command in the provided context (if available) and returns a Mono with the typed result.
      Type Parameters:
      R - the result type
      Parameters:
      command - the command payload to send
      resultType - the expected result type
      context - the processing context, if any, to dispatch the given command in
      Returns:
      a Mono completing with the command result
    • send

      default <R> reactor.core.publisher.Mono<R> send(Object command, Class<R> resultType)
      Sends the given command and returns a Mono with the typed result.
      Type Parameters:
      R - the result type
      Parameters:
      command - the command payload to send
      resultType - the expected result type
      Returns:
      a Mono completing with the command result
      See Also:
    • send

      reactor.core.publisher.Mono<Void> send(Object command, @Nullable ProcessingContext context)
      Sends the given command in the provided context (if available) and returns a Mono that completes when the command is handled.
      Parameters:
      command - the command payload to send
      context - the processing context, if any, to dispatch the given command in
      Returns:
      a Mono completing when the command is handled
    • send

      default reactor.core.publisher.Mono<Void> send(Object command)
      Sends the given command and returns a Mono that completes when the command is handled.
      Parameters:
      command - the command payload to send
      Returns:
      a Mono completing when the command is handled
      See Also: