org.apache.http.nio
Interface NHttpConnection

All Superinterfaces:
org.apache.http.HttpConnection, IOControl
All Known Subinterfaces:
NHttpClientConnection, NHttpServerConnection
All Known Implementing Classes:
DefaultNHttpClientConnection, DefaultNHttpServerConnection, NHttpConnectionBase

public interface NHttpConnection
extends org.apache.http.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

Method Summary
 org.apache.http.protocol.HttpContext getContext()
          Returns an HTTP execution context associated with this connection.
 org.apache.http.HttpRequest getHttpRequest()
          Returns the current HTTP request if one is being received / transmitted.
 org.apache.http.HttpResponse getHttpResponse()
          Returns the current HTTP response if one is being received / transmitted.
 
Methods inherited from interface org.apache.http.HttpConnection
close, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown
 
Methods inherited from interface org.apache.http.nio.IOControl
requestInput, requestOutput, suspendInput, suspendOutput
 

Method Detail

getHttpRequest

public org.apache.http.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

public org.apache.http.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

public org.apache.http.protocol.HttpContext getContext()
Returns an HTTP execution context associated with this connection.

Returns:
HTTP context


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