java.lang.Object | |
↳ | org.apache.http.impl.nio.NHttpConnectionBase |
Known Direct Subclasses |
This class serves as a base for all NHttpConnection
implementations
and implements functionality common to both client and server
HTTP connections.
The following parameters can be used to customize the behavior of this class:
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.apache.http.nio.NHttpConnection
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
connMetrics | |||||||||||
contentDecoder | |||||||||||
contentEncoder | |||||||||||
context | |||||||||||
hasBufferedInput | |||||||||||
hasBufferedOutput | |||||||||||
inTransportMetrics | |||||||||||
inbuf | |||||||||||
incomingContentStrategy | |||||||||||
outTransportMetrics | |||||||||||
outbuf | |||||||||||
outgoingContentStrategy | |||||||||||
request | |||||||||||
response | |||||||||||
session | |||||||||||
status |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new instance of this class given the underlying I/O session.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an HTTP execution context associated with this connection.
| |||||||||||
Returns the current HTTP request if one is being received / transmitted.
| |||||||||||
Returns the current HTTP response if one is being received / transmitted.
| |||||||||||
Returns status of the connection:
| |||||||||||
Determines if the session input buffer contains data.
| |||||||||||
Determines if the session output buffer contains data.
| |||||||||||
Requests event notifications to be triggered when the underlying
channel is ready for input operations.
| |||||||||||
Requests event notifications to be triggered when the underlying
channel is ready for output operations.
| |||||||||||
Shuts down the underlying channel.
| |||||||||||
Suspends event notifications about the underlying channel being
ready for input operations.
| |||||||||||
Suspends event notifications about the underlying channel being
ready for output operations.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Assets if the connection is still open.
| |||||||||||
Factory method for
ContentDecoder instances. | |||||||||||
Factory method for
ContentEncoder instances. | |||||||||||
Initializes a specific
ContentDecoder implementation based on the
properties of the given HttpMessage and generates an instance of
HttpEntity matching the properties of the content decoder. | |||||||||||
Initializes a specific
ContentEncoder implementation based on the
properties of the given HttpMessage. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.http.HttpConnection
| |||||||||||
From interface
org.apache.http.HttpInetConnection
| |||||||||||
From interface
org.apache.http.nio.IOControl
| |||||||||||
From interface
org.apache.http.nio.NHttpConnection
| |||||||||||
From interface
org.apache.http.nio.reactor.SessionBufferStatus
|
Creates a new instance of this class given the underlying I/O session.
session | the underlying I/O session. |
---|---|
allocator | byte buffer allocator. |
params | HTTP parameters. |
Returns an HTTP execution context associated with this connection.
Returns the current HTTP request if one is being received / transmitted.
Otherwise returns null
.
null
otherwise.
Returns the current HTTP response if one is being received / transmitted. Otherwise returns null.
null
otherwise.
Determines if the session input buffer contains data.
true
if the session input buffer contains data,
false
otherwise.
Determines if the session output buffer contains data.
true
if the session output buffer contains data,
false
otherwise.
Requests event notifications to be triggered when the underlying channel is ready for input operations.
Requests event notifications to be triggered when the underlying channel is ready for output operations.
Suspends event notifications about the underlying channel being ready for input operations.
Suspends event notifications about the underlying channel being ready for output operations.
Assets if the connection is still open.
ConnectionClosedException | in case the connection has already been closed. |
---|
Factory method for ContentDecoder
instances.
len | content length, if known, CHUNKED or
IDENTITY , if unknown. |
---|---|
channel | the session channel. |
buffer | the session buffer. |
metrics | transport metrics. |
Factory method for ContentEncoder
instances.
len | content length, if known, CHUNKED or
IDENTITY , if unknown. |
---|---|
channel | the session channel. |
buffer | the session buffer. |
metrics | transport metrics. |
Initializes a specific ContentDecoder
implementation based on the
properties of the given HttpMessage and generates an instance of
HttpEntity matching the properties of the content decoder.
message | the HTTP message. |
---|
HttpException | in case of an HTTP protocol violation. |
---|
Initializes a specific ContentEncoder
implementation based on the
properties of the given HttpMessage.
message | the HTTP message. |
---|
HttpException | in case of an HTTP protocol violation. |
---|