Interface ReactiveServerController<A extends ExchangeContext,B extends Exchange<A>,C extends ErrorExchange<A>>

Type Parameters:
A - the type of the exchange context
B - the type of exchange handled by the controller
C - the type of error exchange handled by the controller
All Known Subinterfaces:
ServerController<A,B,C>

public interface ReactiveServerController<A extends ExchangeContext,B extends Exchange<A>,C extends ErrorExchange<A>>

A reactive server controller defines how exchanges and error exchanges must be handled within the HTTP server following reactive principles.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    defer(B exchange)
    Returns a Mono that defers the processing of an exchange.
    defer(C errorExchange)
    Returns a Mono that defers the processing of an error exchange.
  • Method Details

    • defer

      Mono<Void> defer(B exchange)

      Returns a Mono that defers the processing of an exchange.

      The HTTP server subscribes to the returned Mono and, on completion, subscribes to the exchange response body data publisher to respond to the client.

      Parameters:
      exchange - the exchange to process
      Returns:
      an empty mono that completes when the exchange has been processed
      See Also:
    • defer

      Mono<Void> defer(C errorExchange)

      Returns a Mono that defers the processing of an error exchange.

      In case of error, the HTTP server creates an error exchange from the original exchange, subscribes to the returned Mono and on completion, subscribes to the error exchange response body data publisher to respond to the client.

      Parameters:
      errorExchange - the error exchange to process
      Returns:
      an empty mono that completes when the error exchange has been processed
      See Also: