Interface BaseExchange<A extends ExchangeContext>

Type Parameters:
A - The exchange context type

public interface BaseExchange<A extends ExchangeContext>

Base HTTP exchange (request/response) for representing server or client exchanges.

An HTTP exchange basically comes down to a request and a response being exchanged between a client and a server. In a client exchange, the client sends the request to the server and receives the response from the server. In a server exchange, the server receives the request from the client and sends the response to the client.

A context is also attached to every exchange to provide contextual data and operation during during the processing of the exchange.

Since:
1.6
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the context attached to the exchange.
    Returns the protocol of the exchange (eg.
    Returns the request part of the exchange.
    Returns the response part of the exchange.
  • Method Details

    • getProtocol

      HttpVersion getProtocol()

      Returns the protocol of the exchange (eg. HTTP/1.1).

      Returns:
      the protocol
    • request

      BaseRequest request()

      Returns the request part of the exchange.

      Returns:
      the request part
    • response

      BaseResponse response()

      Returns the response part of the exchange.

      Returns:
      the response part
    • context

      A context()

      Returns the context attached to the exchange.

      Returns:
      the exchange context or null