org.apache.http.impl.conn
Class DefaultManagedHttpClientConnection
java.lang.Object
org.apache.http.impl.BHttpConnectionBase
org.apache.http.impl.DefaultBHttpClientConnection
org.apache.http.impl.conn.DefaultManagedHttpClientConnection
- All Implemented Interfaces:
- Closeable, ManagedHttpClientConnection, HttpClientConnection, HttpConnection, HttpInetConnection, HttpContext
public class DefaultManagedHttpClientConnection
- extends DefaultBHttpClientConnection
- implements ManagedHttpClientConnection, HttpContext
Default ManagedHttpClientConnection
implementation.
- Since:
- 4.3
Constructor Summary |
DefaultManagedHttpClientConnection(String id,
int buffersize)
|
DefaultManagedHttpClientConnection(String id,
int buffersize,
int fragmentSizeHint,
CharsetDecoder chardecoder,
CharsetEncoder charencoder,
MessageConstraints constraints,
ContentLengthStrategy incomingContentStrategy,
ContentLengthStrategy outgoingContentStrategy,
HttpMessageWriterFactory<HttpRequest> requestWriterFactory,
HttpMessageParserFactory<HttpResponse> responseParserFactory)
|
Methods inherited from class org.apache.http.impl.BHttpConnectionBase |
awaitInput, close, createInputStream, createOutputStream, doFlush, ensureOpen, getLocalAddress, getLocalPort, getMetrics, getRemoteAddress, getRemotePort, getSessionInputBuffer, getSessionOutputBuffer, getSocketInputStream, getSocketOutputStream, getSocketTimeout, incrementRequestCount, incrementResponseCount, isOpen, isStale, prepareInput, prepareOutput, setSocketTimeout, toString |
DefaultManagedHttpClientConnection
public DefaultManagedHttpClientConnection(String id,
int buffersize,
int fragmentSizeHint,
CharsetDecoder chardecoder,
CharsetEncoder charencoder,
MessageConstraints constraints,
ContentLengthStrategy incomingContentStrategy,
ContentLengthStrategy outgoingContentStrategy,
HttpMessageWriterFactory<HttpRequest> requestWriterFactory,
HttpMessageParserFactory<HttpResponse> responseParserFactory)
DefaultManagedHttpClientConnection
public DefaultManagedHttpClientConnection(String id,
int buffersize)
getId
public String getId()
- Description copied from interface:
ManagedHttpClientConnection
- Returns connection ID which is expected to be unique
for the life span of the connection manager.
- Specified by:
getId
in interface ManagedHttpClientConnection
shutdown
public void shutdown()
throws IOException
- Specified by:
shutdown
in interface HttpConnection
- Overrides:
shutdown
in class BHttpConnectionBase
- Throws:
IOException
getAttribute
public Object getAttribute(String id)
- Specified by:
getAttribute
in interface HttpContext
removeAttribute
public Object removeAttribute(String id)
- Specified by:
removeAttribute
in interface HttpContext
setAttribute
public void setAttribute(String id,
Object obj)
- Specified by:
setAttribute
in interface HttpContext
bind
public void bind(Socket socket)
throws IOException
- Description copied from interface:
ManagedHttpClientConnection
- Binds this connection to the given socket. The connection
is considered open if it is bound and the underlying socket
is connection to a remote host.
- Specified by:
bind
in interface ManagedHttpClientConnection
- Overrides:
bind
in class DefaultBHttpClientConnection
- Parameters:
socket
- the socket to bind the connection to.
- Throws:
IOException
getSocket
public Socket getSocket()
- Description copied from interface:
ManagedHttpClientConnection
- Returns the underlying socket.
- Specified by:
getSocket
in interface ManagedHttpClientConnection
- Overrides:
getSocket
in class BHttpConnectionBase
getSSLSession
public SSLSession getSSLSession()
- Description copied from interface:
ManagedHttpClientConnection
- Obtains the SSL session of the underlying connection, if any.
If this connection is open, and the underlying socket is an
SSLSocket
, the SSL session of
that socket is obtained. This is a potentially blocking operation.
- Specified by:
getSSLSession
in interface ManagedHttpClientConnection
- Returns:
- the underlying SSL session if available,
null
otherwise
Copyright © 1999–2018 The Apache Software Foundation. All rights reserved.