org.apache.http.impl.nio
Class DefaultNHttpServerConnection

java.lang.Object
  extended byorg.apache.http.impl.nio.NHttpConnectionBase
      extended byorg.apache.http.impl.nio.DefaultNHttpServerConnection
All Implemented Interfaces:
org.apache.http.HttpConnection, org.apache.http.HttpInetConnection, IOControl, NHttpConnection, NHttpServerConnection, SessionBufferStatus

public class DefaultNHttpServerConnection
extends NHttpConnectionBase
implements NHttpServerConnection


Field Summary
 
Fields inherited from class org.apache.http.impl.nio.NHttpConnectionBase
closed, contentDecoder, contentEncoder, context, hasBufferedInput, hasBufferedOutput, inbuf, incomingContentStrategy, lineBuffer, outbuf, outgoingContentStrategy, request, response, session
 
Constructor Summary
DefaultNHttpServerConnection(IOSession session, org.apache.http.HttpRequestFactory requestFactory, org.apache.http.params.HttpParams params)
           
 
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).
 void consumeInput(NHttpServiceHandler handler)
           
 boolean isResponseSubmitted()
          Returns true if an HTTP response has been submitted to the client.
 void produceOutput(NHttpServiceHandler handler)
           
 void submitResponse(org.apache.http.HttpResponse response)
          Submits the HTTP response to the client.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.http.impl.nio.NHttpConnectionBase
assertNotClosed, close, getContext, getHttpRequest, getHttpResponse, getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort, getSocketTimeout, hasBufferedInput, hasBufferedOutput, isOpen, isStale, prepareDecoder, prepareEncoder, requestInput, requestOutput, setSocketTimeout, shutdown, suspendInput, suspendOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

DefaultNHttpServerConnection

public DefaultNHttpServerConnection(IOSession session,
                                    org.apache.http.HttpRequestFactory requestFactory,
                                    org.apache.http.params.HttpParams params)
Method Detail

consumeInput

public void consumeInput(NHttpServiceHandler handler)

produceOutput

public void produceOutput(NHttpServiceHandler handler)

submitResponse

public void submitResponse(org.apache.http.HttpResponse response)
                    throws org.apache.http.HttpException
Description copied from interface: NHttpServerConnection
Submits the HTTP response to the client.

Specified by:
submitResponse in interface NHttpServerConnection
Parameters:
response - HTTP response
Throws:
org.apache.http.HttpException - if the HTTP response violates the HTTP protocol.

isResponseSubmitted

public boolean isResponseSubmitted()
Description copied from interface: NHttpServerConnection
Returns true if an HTTP response has been submitted to the client.

Specified by:
isResponseSubmitted in interface NHttpServerConnection
Returns:
true if an HTTP response has been submitted, false otherwise.

cancelRequest

public void cancelRequest()
Description copied from interface: NHttpServerConnection
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).

Specified by:
cancelRequest in interface NHttpServerConnection

toString

public java.lang.String toString()


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