org.apache.http.nio
Interface NHttpServerConnection

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

public interface NHttpServerConnection
extends NHttpConnection

Abstract non-blocking server-side HTTP connection. It can be used to receive HTTP requests and asynchronously submit 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 isResponseSubmitted()
          Returns true if an HTTP response has been submitted to the client.
 void submitResponse(org.apache.http.HttpResponse response)
          Submits the HTTP response to the client.
 
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

submitResponse

public void submitResponse(org.apache.http.HttpResponse response)
                    throws org.apache.http.HttpException
Submits the HTTP response to the client.

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

isResponseSubmitted

public boolean isResponseSubmitted()
Returns true if an HTTP response has been submitted to the client.

Returns:
true if an HTTP response 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.