Package org.apache.http.impl.conn
Class LoggingManagedHttpClientConnection
- java.lang.Object
-
- org.apache.http.impl.BHttpConnectionBase
-
- org.apache.http.impl.DefaultBHttpClientConnection
-
- org.apache.http.impl.conn.DefaultManagedHttpClientConnection
-
- org.apache.http.impl.conn.LoggingManagedHttpClientConnection
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ManagedHttpClientConnection
,org.apache.http.HttpClientConnection
,org.apache.http.HttpConnection
,org.apache.http.HttpInetConnection
,org.apache.http.protocol.HttpContext
class LoggingManagedHttpClientConnection extends DefaultManagedHttpClientConnection
-
-
Constructor Summary
Constructors Constructor Description LoggingManagedHttpClientConnection(java.lang.String id, org.apache.commons.logging.Log log, org.apache.commons.logging.Log headerLog, org.apache.commons.logging.Log wireLog, int bufferSize, int fragmentSizeHint, java.nio.charset.CharsetDecoder charDecoder, java.nio.charset.CharsetEncoder charEncoder, org.apache.http.config.MessageConstraints constraints, org.apache.http.entity.ContentLengthStrategy incomingContentStrategy, org.apache.http.entity.ContentLengthStrategy outgoingContentStrategy, org.apache.http.io.HttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory, org.apache.http.io.HttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected java.io.InputStream
getSocketInputStream(java.net.Socket socket)
protected java.io.OutputStream
getSocketOutputStream(java.net.Socket socket)
protected void
onRequestSubmitted(org.apache.http.HttpRequest request)
protected void
onResponseReceived(org.apache.http.HttpResponse response)
void
setSocketTimeout(int timeout)
void
shutdown()
-
Methods inherited from class org.apache.http.impl.conn.DefaultManagedHttpClientConnection
bind, getAttribute, getId, getSocket, getSSLSession, removeAttribute, setAttribute
-
Methods inherited from class org.apache.http.impl.DefaultBHttpClientConnection
flush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader
-
Methods inherited from class org.apache.http.impl.BHttpConnectionBase
awaitInput, createInputStream, createOutputStream, doFlush, ensureOpen, getLocalAddress, getLocalPort, getMetrics, getRemoteAddress, getRemotePort, getSessionInputBuffer, getSessionOutputBuffer, getSocketTimeout, incrementRequestCount, incrementResponseCount, isOpen, isStale, prepareInput, prepareOutput, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.http.HttpClientConnection
flush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader
-
-
-
-
Field Detail
-
log
private final org.apache.commons.logging.Log log
-
headerLog
private final org.apache.commons.logging.Log headerLog
-
wire
private final Wire wire
-
-
Constructor Detail
-
LoggingManagedHttpClientConnection
public LoggingManagedHttpClientConnection(java.lang.String id, org.apache.commons.logging.Log log, org.apache.commons.logging.Log headerLog, org.apache.commons.logging.Log wireLog, int bufferSize, int fragmentSizeHint, java.nio.charset.CharsetDecoder charDecoder, java.nio.charset.CharsetEncoder charEncoder, org.apache.http.config.MessageConstraints constraints, org.apache.http.entity.ContentLengthStrategy incomingContentStrategy, org.apache.http.entity.ContentLengthStrategy outgoingContentStrategy, org.apache.http.io.HttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory, org.apache.http.io.HttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceorg.apache.http.HttpConnection
- Overrides:
close
in classorg.apache.http.impl.BHttpConnectionBase
- Throws:
java.io.IOException
-
setSocketTimeout
public void setSocketTimeout(int timeout)
- Specified by:
setSocketTimeout
in interfaceorg.apache.http.HttpConnection
- Overrides:
setSocketTimeout
in classorg.apache.http.impl.BHttpConnectionBase
-
shutdown
public void shutdown() throws java.io.IOException
- Specified by:
shutdown
in interfaceorg.apache.http.HttpConnection
- Overrides:
shutdown
in classDefaultManagedHttpClientConnection
- Throws:
java.io.IOException
-
getSocketInputStream
protected java.io.InputStream getSocketInputStream(java.net.Socket socket) throws java.io.IOException
- Overrides:
getSocketInputStream
in classorg.apache.http.impl.BHttpConnectionBase
- Throws:
java.io.IOException
-
getSocketOutputStream
protected java.io.OutputStream getSocketOutputStream(java.net.Socket socket) throws java.io.IOException
- Overrides:
getSocketOutputStream
in classorg.apache.http.impl.BHttpConnectionBase
- Throws:
java.io.IOException
-
onResponseReceived
protected void onResponseReceived(org.apache.http.HttpResponse response)
- Overrides:
onResponseReceived
in classorg.apache.http.impl.DefaultBHttpClientConnection
-
onRequestSubmitted
protected void onRequestSubmitted(org.apache.http.HttpRequest request)
- Overrides:
onRequestSubmitted
in classorg.apache.http.impl.DefaultBHttpClientConnection
-
-