@NotThreadSafe public class DefaultManagedHttpClientConnection extends org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection implements ManagedHttpClientConnection, org.apache.hc.core5.http.protocol.HttpContext
ManagedHttpClientConnection implementation.| Constructor and Description |
|---|
DefaultManagedHttpClientConnection(String id,
int buffersize) |
DefaultManagedHttpClientConnection(String id,
int buffersize,
int fragmentSizeHint,
CharsetDecoder chardecoder,
CharsetEncoder charencoder,
org.apache.hc.core5.http.config.MessageConstraints constraints,
org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy,
org.apache.hc.core5.http.ContentLengthStrategy outgoingContentStrategy,
org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.HttpRequest> requestWriterFactory,
org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.HttpResponse> responseParserFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
awaitInput(int arg0) |
void |
bind(Socket socket)
Binds this connection to the given socket.
|
protected InputStream |
createContentInputStream(long arg0,
org.apache.hc.core5.http.io.SessionInputBuffer arg1) |
protected OutputStream |
createContentOutputStream(long arg0,
org.apache.hc.core5.http.io.SessionOutputBuffer arg1,
org.apache.hc.core5.http.TrailerSupplier arg2) |
protected void |
ensureOpen() |
Object |
getAttribute(String id) |
String |
getId()
Returns connection ID which is expected to be unique
for the life span of the connection manager.
|
Socket |
getSocket()
Returns the underlying socket.
|
protected InputStream |
getSocketInputStream(Socket arg0) |
protected OutputStream |
getSocketOutputStream(Socket arg0) |
SSLSession |
getSSLSession()
Obtains the SSL session of the underlying connection, if any.
|
protected void |
incrementRequestCount() |
protected void |
incrementResponseCount() |
Object |
removeAttribute(String id) |
void |
setAttribute(String id,
Object obj) |
void |
shutdown() |
isConsistent, onRequestSubmitted, onResponseReceived, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequestclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequestpublic DefaultManagedHttpClientConnection(String id, int buffersize, int fragmentSizeHint, CharsetDecoder chardecoder, CharsetEncoder charencoder, org.apache.hc.core5.http.config.MessageConstraints constraints, org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy, org.apache.hc.core5.http.ContentLengthStrategy outgoingContentStrategy, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.HttpRequest> requestWriterFactory, org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.HttpResponse> responseParserFactory)
public DefaultManagedHttpClientConnection(String id, int buffersize)
public String getId()
ManagedHttpClientConnectiongetId in interface ManagedHttpClientConnectionpublic void shutdown()
throws IOException
shutdown in interface org.apache.hc.core5.http.HttpConnectionshutdown in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionIOExceptionpublic Object getAttribute(String id)
getAttribute in interface org.apache.hc.core5.http.protocol.HttpContextpublic Object removeAttribute(String id)
removeAttribute in interface org.apache.hc.core5.http.protocol.HttpContextpublic void setAttribute(String id, Object obj)
setAttribute in interface org.apache.hc.core5.http.protocol.HttpContextpublic void bind(Socket socket) throws IOException
ManagedHttpClientConnectionbind in interface ManagedHttpClientConnectionbind in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionsocket - the socket to bind the connection to.IOExceptionpublic Socket getSocket()
ManagedHttpClientConnectiongetSocket in interface ManagedHttpClientConnectionpublic SSLSession getSSLSession()
ManagedHttpClientConnectionSSLSocket, the SSL session of
that socket is obtained. This is a potentially blocking operation.getSSLSession in interface ManagedHttpClientConnectionnull otherwiseprotected void ensureOpen()
throws IOException
IOExceptionprotected InputStream getSocketInputStream(Socket arg0) throws IOException
IOExceptionprotected OutputStream getSocketOutputStream(Socket arg0) throws IOException
IOExceptionprotected OutputStream createContentOutputStream(long arg0, org.apache.hc.core5.http.io.SessionOutputBuffer arg1, org.apache.hc.core5.http.TrailerSupplier arg2)
protected InputStream createContentInputStream(long arg0, org.apache.hc.core5.http.io.SessionInputBuffer arg1)
protected boolean awaitInput(int arg0)
throws IOException
IOExceptionprotected void incrementRequestCount()
protected void incrementResponseCount()
Copyright © 1999–2016 The Apache Software Foundation. All rights reserved.