Package org.apache.hc.core5.http.impl.io
Class DefaultBHttpClientConnectionFactory
- java.lang.Object
-
- org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionFactory
-
- All Implemented Interfaces:
HttpConnectionFactory<DefaultBHttpClientConnection>
@Contract(threading=IMMUTABLE_CONDITIONAL) public class DefaultBHttpClientConnectionFactory extends java.lang.Object implements HttpConnectionFactory<DefaultBHttpClientConnection>
Default factory forHttpClientConnections.- Since:
- 4.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultBHttpClientConnectionFactory.BuilderBuilder forDefaultBHttpClientConnectionFactory.
-
Constructor Summary
Constructors Constructor Description DefaultBHttpClientConnectionFactory()DefaultBHttpClientConnectionFactory(Http1Config http1Config, CharCodingConfig charCodingConfig)DefaultBHttpClientConnectionFactory(Http1Config http1Config, CharCodingConfig charCodingConfig, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)DefaultBHttpClientConnectionFactory(Http1Config http1Config, CharCodingConfig charCodingConfig, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultBHttpClientConnectionFactory.Builderbuilder()Create a newDefaultBHttpClientConnectionFactory.Builder.DefaultBHttpClientConnectioncreateConnection(java.net.Socket socket)Creates TLS connection with aSSLSocketlayered over a plainSocket.DefaultBHttpClientConnectioncreateConnection(javax.net.ssl.SSLSocket sslSocket, java.net.Socket socket)Creates TLS connection with aSSLSocketlayered over a plainSocket.
-
-
-
Constructor Detail
-
DefaultBHttpClientConnectionFactory
public DefaultBHttpClientConnectionFactory(Http1Config http1Config, CharCodingConfig charCodingConfig, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)
-
DefaultBHttpClientConnectionFactory
public DefaultBHttpClientConnectionFactory(Http1Config http1Config, CharCodingConfig charCodingConfig, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)
-
DefaultBHttpClientConnectionFactory
public DefaultBHttpClientConnectionFactory(Http1Config http1Config, CharCodingConfig charCodingConfig)
-
DefaultBHttpClientConnectionFactory
public DefaultBHttpClientConnectionFactory()
-
-
Method Detail
-
createConnection
public DefaultBHttpClientConnection createConnection(java.net.Socket socket) throws java.io.IOException
Description copied from interface:HttpConnectionFactoryCreates TLS connection with aSSLSocketlayered over a plainSocket.- Specified by:
createConnectionin interfaceHttpConnectionFactory<DefaultBHttpClientConnection>- 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
public DefaultBHttpClientConnection createConnection(javax.net.ssl.SSLSocket sslSocket, java.net.Socket socket) throws java.io.IOException
Description copied from interface:HttpConnectionFactoryCreates TLS connection with aSSLSocketlayered over a plainSocket.- Specified by:
createConnectionin interfaceHttpConnectionFactory<DefaultBHttpClientConnection>- 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
-
builder
public static DefaultBHttpClientConnectionFactory.Builder builder()
Create a newDefaultBHttpClientConnectionFactory.Builder.- Since:
- 5.1
-
-