public interface NHttpConnection extends HttpConnection, IOControl
HttpRequest
and HttpResponse
that are
being transmitted over this connection. Both the request and
the response objects can be null
if there is no incoming or
outgoing message currently being transferred.
Please note non-blocking HTTP connections are stateful and not thread safe.
Input / output operations on non-blocking HTTP connections should be
restricted to the dispatch events triggered by the I/O event dispatch thread.
However, the IOControl
interface is fully threading safe and can be
manipulated from any thread.
Modifier and Type | Field and Description |
---|---|
static int |
ACTIVE |
static int |
CLOSED |
static int |
CLOSING |
Modifier and Type | Method and Description |
---|---|
HttpContext |
getContext()
Returns an HTTP execution context associated with this connection.
|
HttpRequest |
getHttpRequest()
Returns the current HTTP request if one is being received / transmitted.
|
HttpResponse |
getHttpResponse()
Returns the current HTTP response if one is being received / transmitted.
|
int |
getStatus()
Returns status of the connection:
|
close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown
requestInput, requestOutput, shutdown, suspendInput, suspendOutput
static final int ACTIVE
static final int CLOSING
static final int CLOSED
int getStatus()
ACTIVE
: connection is active.
CLOSING
: connection is being closed.
CLOSED
: connection has been closed.
HttpRequest getHttpRequest()
null
.null
otherwise.HttpResponse getHttpResponse()
null
.null
otherwise.HttpContext getContext()
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.