org.apache.http.nio
Interface NHttpClientConnection

All Superinterfaces:
org.apache.http.HttpConnection, IOControl, NHttpConnection
All Known Subinterfaces:
NHttpClientIOTarget
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

Field Summary
 
Fields inherited from interface org.apache.http.nio.NHttpConnection
ACTIVE, CLOSED, CLOSING
 
Method Summary
 boolean isRequestSubmitted()
          Returns true if an HTTP request has been submitted to the target server.
 void resetInput()
          Resets output state.
 void resetOutput()
          Resets input state.
 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, 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
 

Method Detail

submitRequest

void submitRequest(org.apache.http.HttpRequest request)
                   throws java.io.IOException,
                          org.apache.http.HttpException
Submits the HTTP request to the target server.

Parameters:
request - HTTP request
Throws:
java.io.IOException - if I/O error occurs while submitting the request
org.apache.http.HttpException - if the HTTP request violates the HTTP protocol.

isRequestSubmitted

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.

resetOutput

void resetOutput()
Resets input state. This method can be used to prematurely terminate processing of the outgoing HTTP request.


resetInput

void resetInput()
Resets output state. This method can be used to prematurely terminate processing of the incoming HTTP response.



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