Class HttpClientTransportOverHTTP

All Implemented Interfaces:
HttpClient.Aware, HttpClientTransport, ClientConnectionFactory, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle

@ManagedObject("The HTTP/1.1 client transport") public class HttpClientTransportOverHTTP extends AbstractConnectorHttpClientTransport
  • Field Details

  • Constructor Details

    • HttpClientTransportOverHTTP

      public HttpClientTransportOverHTTP()
    • HttpClientTransportOverHTTP

      public HttpClientTransportOverHTTP(int selectors)
    • HttpClientTransportOverHTTP

      public HttpClientTransportOverHTTP(ClientConnector connector)
  • Method Details

    • newOrigin

      public Origin newOrigin(Request request)
      Description copied from interface: HttpClientTransport
      Creates a new Origin with the given request.
      Parameters:
      request - the request that triggers the creation of the Origin
      Returns:
      an Origin that identifies a destination
    • newDestination

      public Destination newDestination(Origin origin)
      Description copied from interface: HttpClientTransport
      Creates a new, transport-specific, HttpDestination object.

      HttpDestination controls the destination-connection cardinality: protocols like HTTP have 1-N cardinality, while multiplexed protocols like HTTP/2 have a 1-1 cardinality.

      Parameters:
      origin - the destination origin
      Returns:
      a new, transport-specific, HttpDestination object
    • newConnection

      public Connection newConnection(EndPoint endPoint, Map<String,Object> context) throws IOException
      Parameters:
      endPoint - the EndPoint to link the newly created connection to
      context - the context data to create the connection
      Returns:
      a new Connection
      Throws:
      IOException - if the connection cannot be created
    • getHeaderCacheSize

      @ManagedAttribute("The maximum allowed size in bytes for the HTTP header field cache") public int getHeaderCacheSize()
      Returns:
      the max size in bytes for the HTTP header field cache
    • setHeaderCacheSize

      public void setHeaderCacheSize(int headerCacheSize)
      Parameters:
      headerCacheSize - the max size in bytes for the HTTP header field cache
    • isHeaderCacheCaseSensitive

      @ManagedAttribute("Whether the HTTP header field cache is case-sensitive") public boolean isHeaderCacheCaseSensitive()
      Returns:
      whether the HTTP header field cache is case-sensitive
    • setHeaderCacheCaseSensitive

      public void setHeaderCacheCaseSensitive(boolean headerCacheCaseSensitive)
      Parameters:
      headerCacheCaseSensitive - whether the HTTP header field cache is case-sensitive
    • isInitializeConnections

      @ManagedAttribute("Whether newly created connections should be initialized with an OPTIONS * HTTP/1.1 request") public boolean isInitializeConnections()
      Returns:
      whether newly created connections should be initialized with an OPTIONS * HTTP/1.1 request
    • setInitializeConnections

      public void setInitializeConnections(boolean initialize)
      Parameters:
      initialize - whether newly created connections should be initialized with an OPTIONS * HTTP/1.1 request