org.apache.http.nio
Interface NHttpClientConnection

All Superinterfaces:
org.apache.http.HttpConnection, IOControl, NHttpConnection
All Known Implementing Classes:
DefaultNHttpClientConnection

public interface NHttpClientConnection
extends NHttpConnection

Abstract non-blocking client-side HTTP connection. It can be used to submit HTTP requests and asynchronously receive HTTP responses.

Author:
Oleg Kalnichevski

Method Summary
 void cancelRequest()
          Cancels pending HTTP request if it failed the target server expections (the target server responded with non 1xx status code during the 'expect: continue' handshake.
 boolean isRequestSubmitted()
          Returns true if an HTTP request has been submitted to the target server.
 void submitRequest(org.apache.http.HttpRequest request)
          Submits the HTTP request to the target server.
 
Methods inherited from interface org.apache.http.nio.NHttpConnection
getContext, getHttpRequest, getHttpResponse
 
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

submitRequest

public void submitRequest(org.apache.http.HttpRequest request)
                   throws org.apache.http.HttpException
Submits the HTTP request to the target server.

Parameters:
request - HTTP request
Throws:
org.apache.http.HttpException - if the HTTP request violates the HTTP protocol.

isRequestSubmitted

public boolean isRequestSubmitted()
Returns true if an HTTP request has been submitted to the target server.

Returns:
true if an HTTP request has been submitted, false otherwise.

cancelRequest

public void cancelRequest()
Cancels pending HTTP request if it failed the target server expections (the target server responded with non 1xx status code during the 'expect: continue' handshake.



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