|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.nio.DefaultClientIOEventDispatch
public class DefaultClientIOEventDispatch
Default implementation of IOEventDispatch interface for plain
(unencrypted) client-side HTTP connections.
The following parameters can be used to customize the behavior of this class:
CoreProtocolPNames.HTTP_ELEMENT_CHARSETCoreConnectionPNames.SOCKET_BUFFER_SIZECoreConnectionPNames.MAX_HEADER_COUNTCoreConnectionPNames.MAX_LINE_LENGTH
| Field Summary | |
|---|---|
protected ByteBufferAllocator |
allocator
|
protected NHttpClientHandler |
handler
|
protected HttpParams |
params
|
| Constructor Summary | |
|---|---|
DefaultClientIOEventDispatch(NHttpClientHandler handler,
HttpParams params)
Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler. |
|
| Method Summary | |
|---|---|
void |
connected(IOSession session)
Triggered after the given session has been just created. |
protected ByteBufferAllocator |
createByteBufferAllocator()
Creates an instance of HeapByteBufferAllocator to be used
by HTTP connections for allocating ByteBuffer objects. |
protected NHttpClientIOTarget |
createConnection(IOSession session)
Creates an instance of DefaultNHttpClientConnection based on the
given IOSession. |
protected HttpResponseFactory |
createHttpResponseFactory()
Creates an instance of DefaultHttpResponseFactory to be used
by HTTP connections for creating HttpResponse objects. |
void |
disconnected(IOSession session)
Triggered when the given session has been terminated. |
void |
inputReady(IOSession session)
Triggered when the given session has input pending. |
void |
outputReady(IOSession session)
Triggered when the given session is ready for output. |
void |
timeout(IOSession session)
Triggered when the given session as timed out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ByteBufferAllocator allocator
protected final NHttpClientHandler handler
protected final HttpParams params
| Constructor Detail |
|---|
public DefaultClientIOEventDispatch(NHttpClientHandler handler,
HttpParams params)
handler - the client protocol handler.params - HTTP parameters.| Method Detail |
|---|
protected ByteBufferAllocator createByteBufferAllocator()
HeapByteBufferAllocator to be used
by HTTP connections for allocating ByteBuffer objects.
This method can be overridden in a super class in order to provide
a different implementation of the ByteBufferAllocator interface.
protected HttpResponseFactory createHttpResponseFactory()
DefaultHttpResponseFactory to be used
by HTTP connections for creating HttpResponse objects.
This method can be overridden in a super class in order to provide
a different implementation of the HttpResponseFactory interface.
protected NHttpClientIOTarget createConnection(IOSession session)
DefaultNHttpClientConnection based on the
given IOSession.
This method can be overridden in a super class in order to provide
a different implementation of the NHttpClientIOTarget interface.
session - the underlying I/O session.
public void connected(IOSession session)
IOEventDispatch
connected in interface IOEventDispatchsession - the I/O session.public void disconnected(IOSession session)
IOEventDispatch
disconnected in interface IOEventDispatchsession - the I/O session.public void inputReady(IOSession session)
IOEventDispatch
inputReady in interface IOEventDispatchsession - the I/O session.public void outputReady(IOSession session)
IOEventDispatch
outputReady in interface IOEventDispatchsession - the I/O session.public void timeout(IOSession session)
IOEventDispatch
timeout in interface IOEventDispatchsession - the I/O session.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||