org.apache.http.impl.nio
Class DefaultNHttpClientConnection

java.lang.Object
  extended by org.apache.http.impl.nio.NHttpConnectionBase
      extended by org.apache.http.impl.nio.DefaultNHttpClientConnection
All Implemented Interfaces:
HttpConnection, HttpInetConnection, IOControl, NHttpClientConnection, NHttpConnection, SessionBufferStatus

public class DefaultNHttpClientConnection
extends NHttpConnectionBase
implements NHttpClientConnection


Field Summary
 
Fields inherited from class org.apache.http.impl.nio.NHttpConnectionBase
closed, contentDecoder, contentEncoder, context, hasBufferedInput, hasBufferedOutput, inbuf, incomingContentStrategy, lineBuffer, metrics, outbuf, outgoingContentStrategy, request, response, session
 
Constructor Summary
DefaultNHttpClientConnection(IOSession session, HttpResponseFactory responseFactory, ByteBufferAllocator allocator, HttpParams params)
           
 
Method Summary
 void consumeInput(NHttpClientHandler handler)
           
 boolean isRequestSubmitted()
          Returns true if an HTTP request has been submitted to the target server.
 void produceOutput(NHttpClientHandler handler)
           
 void resetInput()
          Resets output state.
 void resetOutput()
          Resets input state.
 void submitRequest(HttpRequest request)
          Submits the HTTP request to the target server.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.http.impl.nio.NHttpConnectionBase
assertNotClosed, close, getContext, getHttpRequest, getHttpResponse, getLocalAddress, getLocalPort, getMetrics, 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, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown
 
Methods inherited from interface org.apache.http.nio.IOControl
requestInput, requestOutput, shutdown, suspendInput, suspendOutput
 

Constructor Detail

DefaultNHttpClientConnection

public DefaultNHttpClientConnection(IOSession session,
                                    HttpResponseFactory responseFactory,
                                    ByteBufferAllocator allocator,
                                    HttpParams params)
Method Detail

resetInput

public void resetInput()
Description copied from interface: NHttpClientConnection
Resets output state. This method can be used to prematurely terminate processing of the incoming HTTP response.

Specified by:
resetInput in interface NHttpClientConnection

resetOutput

public void resetOutput()
Description copied from interface: NHttpClientConnection
Resets input state. This method can be used to prematurely terminate processing of the outgoing HTTP request.

Specified by:
resetOutput in interface NHttpClientConnection

consumeInput

public void consumeInput(NHttpClientHandler handler)

produceOutput

public void produceOutput(NHttpClientHandler handler)

submitRequest

public void submitRequest(HttpRequest request)
                   throws java.io.IOException,
                          HttpException
Description copied from interface: NHttpClientConnection
Submits the HTTP request to the target server.

Specified by:
submitRequest in interface NHttpClientConnection
Parameters:
request - HTTP request
Throws:
java.io.IOException - if I/O error occurs while submitting the request
HttpException - if the HTTP request violates the HTTP protocol.

isRequestSubmitted

public boolean isRequestSubmitted()
Description copied from interface: NHttpClientConnection
Returns true if an HTTP request has been submitted to the target server.

Specified by:
isRequestSubmitted in interface NHttpClientConnection
Returns:
true if an HTTP request has been submitted, false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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