org.apache.http.nio
Interface NHttpConnection

All Superinterfaces:
HttpConnection, IOControl
All Known Subinterfaces:
NHttpClientConnection, NHttpClientIOTarget, NHttpServerConnection, NHttpServerIOTarget
All Known Implementing Classes:
DefaultNHttpClientConnection, DefaultNHttpServerConnection, NHttpConnectionBase

public interface NHttpConnection
extends HttpConnection, IOControl

Abstract non-blocking HTTP connection interface. It contains the current HTTP context, as well as the actual HTTP request and HTTP response objects that are being received / transferred over this connection.

Author:
Oleg Kalnichevski

Field Summary
static int ACTIVE
           
static int CLOSED
           
static int CLOSING
           
 
Method Summary
 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()
           
 
Methods inherited from interface org.apache.http.HttpConnection
close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown
 
Methods inherited from interface org.apache.http.nio.IOControl
requestInput, requestOutput, shutdown, suspendInput, suspendOutput
 

Field Detail

ACTIVE

static final int ACTIVE
See Also:
Constant Field Values

CLOSING

static final int CLOSING
See Also:
Constant Field Values

CLOSED

static final int CLOSED
See Also:
Constant Field Values
Method Detail

getStatus

int getStatus()

getHttpRequest

HttpRequest getHttpRequest()
Returns the current HTTP request if one is being received / transmitted. Otherwise returns null.

Returns:
an HTTP request if available. Otherwise returns null.

getHttpResponse

HttpResponse getHttpResponse()
Returns the current HTTP response if one is being received / transmitted. Otherwise returns null.

Returns:
an HTTP response if available. Otherwise returns null.

getContext

HttpContext getContext()
Returns an HTTP execution context associated with this connection.

Returns:
HTTP context


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.