org.apache.camel.component.jhc
Class BufferingHttpServiceHandler

java.lang.Object
  extended by org.apache.http.nio.protocol.NHttpHandlerBase
      extended by org.apache.http.nio.protocol.NHttpServiceHandlerBase
          extended by org.apache.camel.component.jhc.BufferingHttpServiceHandler
All Implemented Interfaces:
org.apache.http.nio.NHttpServiceHandler
Direct Known Subclasses:
AsyncBufferingHttpServiceHandler

public class BufferingHttpServiceHandler
extends org.apache.http.nio.protocol.NHttpServiceHandlerBase
implements org.apache.http.nio.NHttpServiceHandler

HTTP service handler implementation that buffers the content of HTTP messages entirely in memory and processes HTTP requests on the main I/O thread.

This service handler should be used only when dealing with HTTP messages that are known to be limited in length


Field Summary
 
Fields inherited from class org.apache.http.nio.protocol.NHttpServiceHandlerBase
expectationVerifier, handlerResolver, responseFactory
 
Fields inherited from class org.apache.http.nio.protocol.NHttpHandlerBase
allocator, CONN_STATE, connStrategy, eventListener, httpProcessor, params
 
Constructor Summary
BufferingHttpServiceHandler(org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.HttpResponseFactory responseFactory, org.apache.http.ConnectionReuseStrategy connStrategy, org.apache.http.nio.util.ByteBufferAllocator allocator, org.apache.http.params.HttpParams params)
           
BufferingHttpServiceHandler(org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.HttpResponseFactory responseFactory, org.apache.http.ConnectionReuseStrategy connStrategy, org.apache.http.params.HttpParams params)
           
 
Method Summary
 void closed(org.apache.http.nio.NHttpServerConnection conn)
           
 void connected(org.apache.http.nio.NHttpServerConnection conn)
           
 void exception(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.HttpException httpex)
           
protected  void handleException(org.apache.http.HttpException ex, org.apache.http.HttpResponse response)
           
 void inputReady(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentDecoder decoder)
           
 void outputReady(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentEncoder encoder)
           
protected  void processRequest(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.HttpRequest request)
           
 void requestReceived(org.apache.http.nio.NHttpServerConnection conn)
           
 void responseReady(org.apache.http.nio.NHttpServerConnection conn)
           
protected  void sendResponse(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.HttpResponse response)
           
 
Methods inherited from class org.apache.http.nio.protocol.NHttpServiceHandlerBase
exception, setExpectationVerifier, setHandlerResolver, timeout
 
Methods inherited from class org.apache.http.nio.protocol.NHttpHandlerBase
canResponseHaveBody, closeConnection, getParams, handleTimeout, setEventListener, shutdownConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.nio.NHttpServiceHandler
exception, timeout
 

Constructor Detail

BufferingHttpServiceHandler

public BufferingHttpServiceHandler(org.apache.http.protocol.HttpProcessor httpProcessor,
                                   org.apache.http.HttpResponseFactory responseFactory,
                                   org.apache.http.ConnectionReuseStrategy connStrategy,
                                   org.apache.http.nio.util.ByteBufferAllocator allocator,
                                   org.apache.http.params.HttpParams params)

BufferingHttpServiceHandler

public BufferingHttpServiceHandler(org.apache.http.protocol.HttpProcessor httpProcessor,
                                   org.apache.http.HttpResponseFactory responseFactory,
                                   org.apache.http.ConnectionReuseStrategy connStrategy,
                                   org.apache.http.params.HttpParams params)
Method Detail

connected

public void connected(org.apache.http.nio.NHttpServerConnection conn)
Specified by:
connected in interface org.apache.http.nio.NHttpServiceHandler

requestReceived

public void requestReceived(org.apache.http.nio.NHttpServerConnection conn)
Specified by:
requestReceived in interface org.apache.http.nio.NHttpServiceHandler

closed

public void closed(org.apache.http.nio.NHttpServerConnection conn)
Specified by:
closed in interface org.apache.http.nio.NHttpServiceHandler

exception

public void exception(org.apache.http.nio.NHttpServerConnection conn,
                      org.apache.http.HttpException httpex)
Specified by:
exception in interface org.apache.http.nio.NHttpServiceHandler

inputReady

public void inputReady(org.apache.http.nio.NHttpServerConnection conn,
                       org.apache.http.nio.ContentDecoder decoder)
Specified by:
inputReady in interface org.apache.http.nio.NHttpServiceHandler

responseReady

public void responseReady(org.apache.http.nio.NHttpServerConnection conn)
Specified by:
responseReady in interface org.apache.http.nio.NHttpServiceHandler

outputReady

public void outputReady(org.apache.http.nio.NHttpServerConnection conn,
                        org.apache.http.nio.ContentEncoder encoder)
Specified by:
outputReady in interface org.apache.http.nio.NHttpServiceHandler

handleException

protected void handleException(org.apache.http.HttpException ex,
                               org.apache.http.HttpResponse response)

processRequest

protected void processRequest(org.apache.http.nio.NHttpServerConnection conn,
                              org.apache.http.HttpRequest request)
                       throws IOException,
                              org.apache.http.HttpException
Throws:
IOException
org.apache.http.HttpException

sendResponse

protected void sendResponse(org.apache.http.nio.NHttpServerConnection conn,
                            org.apache.http.HttpResponse response)
                     throws IOException,
                            org.apache.http.HttpException
Throws:
IOException
org.apache.http.HttpException


Apache CAMEL