org.apache.axis2.transport.nhttp
Class HttpCoreNIOSender

java.lang.Object
  extended by org.apache.axis2.handlers.AbstractHandler
      extended by org.apache.axis2.transport.nhttp.HttpCoreNIOSender
All Implemented Interfaces:
Handler, TransportSender
Direct Known Subclasses:
HttpCoreNIOSSLSender

public class HttpCoreNIOSender
extends AbstractHandler
implements TransportSender

NIO transport sender for Axis2 based on HttpCore and NIO extensions


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler
Handler.InvocationResponse
 
Field Summary
 
Fields inherited from class org.apache.axis2.handlers.AbstractHandler
handlerDesc
 
Constructor Summary
HttpCoreNIOSender()
           
 
Method Summary
 void cleanup(MessageContext msgContext)
          Clean up
protected  org.apache.http.nio.reactor.IOEventDispatch getEventDispatch(org.apache.http.nio.NHttpClientHandler handler, javax.net.ssl.SSLContext sslContext, org.apache.http.params.HttpParams params)
          Return the IOEventDispatch implementation to be used.
protected  javax.net.ssl.SSLContext getSSLContext(TransportOutDescription transportOut)
          Always return null, as this implementation does not support outgoing SSL
 void init(ConfigurationContext cfgCtx, TransportOutDescription transportOut)
          Initialize the transport sender, and execute reactor in new seperate thread
 Handler.InvocationResponse invoke(MessageContext msgContext)
          transport sender invocation from Axis2 core
 void stop()
           
 
Methods inherited from class org.apache.axis2.handlers.AbstractHandler
cleanup, flowComplete, getHandlerDesc, getName, getParameter, init, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.axis2.engine.Handler
cleanup, flowComplete, getHandlerDesc, getName, getParameter, init
 

Constructor Detail

HttpCoreNIOSender

public HttpCoreNIOSender()
Method Detail

init

public void init(ConfigurationContext cfgCtx,
                 TransportOutDescription transportOut)
          throws AxisFault
Initialize the transport sender, and execute reactor in new seperate thread

Specified by:
init in interface TransportSender
Parameters:
cfgCtx - the Axis2 configuration context
transportOut - the description of the http/s transport from Axis2 configuration
Throws:
AxisFault - thrown on an error

getEventDispatch

protected org.apache.http.nio.reactor.IOEventDispatch getEventDispatch(org.apache.http.nio.NHttpClientHandler handler,
                                                                       javax.net.ssl.SSLContext sslContext,
                                                                       org.apache.http.params.HttpParams params)
Return the IOEventDispatch implementation to be used. This is overridden by the SSL sender

Parameters:
handler -
sslContext -
params -
Returns:

getSSLContext

protected javax.net.ssl.SSLContext getSSLContext(TransportOutDescription transportOut)
                                          throws AxisFault
Always return null, as this implementation does not support outgoing SSL

Parameters:
transportOut -
Returns:
null
Throws:
AxisFault

invoke

public Handler.InvocationResponse invoke(MessageContext msgContext)
                                  throws AxisFault
transport sender invocation from Axis2 core

Specified by:
invoke in interface Handler
Parameters:
msgContext - message to be sent
Returns:
the invocation response (always InvocationResponse.CONTINUE)
Throws:
AxisFault - on error

cleanup

public void cleanup(MessageContext msgContext)
             throws AxisFault
Description copied from interface: TransportSender
Clean up

Specified by:
cleanup in interface TransportSender
Throws:
AxisFault

stop

public void stop()
Specified by:
stop in interface TransportSender


Copyright © 2007 Apache Web Services Project. All Rights Reserved.