Package org.apache.hc.core5.http.io
Interface HttpConnectionFactory<T extends HttpConnection>
-
- Type Parameters:
T- The type ofHttpConnection.
- All Known Implementing Classes:
DefaultBHttpClientConnectionFactory,DefaultBHttpServerConnectionFactory
public interface HttpConnectionFactory<T extends HttpConnection>Factory forHttpConnectioninstances.- Since:
- 4.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TcreateConnection(java.net.Socket socket)Creates TLS connection with aSSLSocketlayered over a plainSocket.default TcreateConnection(javax.net.ssl.SSLSocket sslSocket, java.net.Socket socket)Creates TLS connection with aSSLSocketlayered over a plainSocket.
-
-
-
Method Detail
-
createConnection
T createConnection(java.net.Socket socket) throws java.io.IOException
Creates TLS connection with aSSLSocketlayered over a plainSocket.- Parameters:
socket- the plain socket SSL socket has been layered over.- Returns:
- a new HttpConnection.
- Throws:
java.io.IOException- in case of an I/O error.
-
createConnection
default T createConnection(javax.net.ssl.SSLSocket sslSocket, java.net.Socket socket) throws java.io.IOException
Creates TLS connection with aSSLSocketlayered over a plainSocket.- Parameters:
sslSocket- the SSL socket. May benull.socket- the plain socket SSL socket has been layered over.- Returns:
- a new HttpConnection.
- Throws:
java.io.IOException- in case of an I/O error.- Since:
- 5.3
-
-