Interface HttpConnectionFactory<T extends HttpConnection>

Type Parameters:
T - The type of HttpConnection.
All Known Implementing Classes:
DefaultBHttpClientConnectionFactory, DefaultBHttpServerConnectionFactory

public interface HttpConnectionFactory<T extends HttpConnection>
Factory for HttpConnection instances.
Since:
4.3
  • Method Details

    • createConnection

      T createConnection(Socket socket) throws IOException
      Creates TLS connection with a SSLSocket layered over a plain Socket.
      Parameters:
      socket - the plain socket SSL socket has been layered over.
      Returns:
      a new HttpConnection.
      Throws:
      IOException - in case of an I/O error.
    • createConnection

      default T createConnection(SSLSocket sslSocket, Socket socket) throws IOException
      Creates TLS connection with a SSLSocket layered over a plain Socket.
      Parameters:
      sslSocket - the SSL socket. May be null.
      socket - the plain socket SSL socket has been layered over.
      Returns:
      a new HttpConnection.
      Throws:
      IOException - in case of an I/O error.
      Since:
      5.3