Interface ExchangeHandler<A extends Exchange>

Type Parameters:
A - the type of the exchange
All Known Subinterfaces:
ErrorExchangeHandler<A,​B>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ExchangeHandler<A extends Exchange>

An exchange handler is used to handle server exchanges.

The HTTP server relies on an exchange handler to actually process a client request and provide a response to the client. It will create an ErrorExchange and invoke the ErrorExchangeHandler in case an error is thrown during that process.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
ErrorExchange, ExchangeHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle​(A exchange)
    Processes the specified server exchange.
  • Method Details

    • handle

      void handle(A exchange) throws HttpException

      Processes the specified server exchange.

      Parameters:
      exchange - the exchange to process
      Throws:
      HttpException - if an error occurs during the processing of the exchange