org.apache.axis2.transport.nhttp
Class HttpCoreNIOListener

java.lang.Object
  extended by org.apache.axis2.transport.nhttp.HttpCoreNIOListener
All Implemented Interfaces:
TransportListener
Direct Known Subclasses:
HttpCoreNIOSSLListener

public class HttpCoreNIOListener
extends java.lang.Object
implements TransportListener

NIO transport listener for Axis2 based on HttpCore and NIO extensions


Field Summary
 
Fields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT
 
Constructor Summary
HttpCoreNIOListener()
           
 
Method Summary
 void destroy()
           
 EndpointReference getEPRForService(java.lang.String serviceName, java.lang.String ip)
          Return the EPR for the given service (implements deprecated method temporarily)
 EndpointReference[] getEPRsForService(java.lang.String serviceName, java.lang.String ip)
          Return the EPRs for the given service over this transport
protected  org.apache.http.nio.reactor.IOEventDispatch getEventDispatch(org.apache.http.nio.NHttpServiceHandler handler, javax.net.ssl.SSLContext sslContext, org.apache.http.impl.nio.reactor.SSLIOSessionHandler sslioSessionHandler, org.apache.http.params.HttpParams params)
           
protected  java.lang.String getServiceEPRPrefix(ConfigurationContext cfgCtx, java.lang.String host, int port)
          Return the EPR prefix for services made available over this transport
 SessionContext getSessionContext(MessageContext messageContext)
          TODO: Return session context from transport, this is an improvement in axis2 1.2 and is not currently supported
protected  javax.net.ssl.SSLContext getSSLContext(TransportInDescription transportIn)
          Create the SSLContext to be used by this listener
 void init(ConfigurationContext cfgCtx, TransportInDescription transprtIn)
          Initialize the transport listener, and execute reactor in new seperate thread
 void start()
          Start the transport listener on a new thread
 void stop()
          Stop the listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpCoreNIOListener

public HttpCoreNIOListener()
Method Detail

getEventDispatch

protected org.apache.http.nio.reactor.IOEventDispatch getEventDispatch(org.apache.http.nio.NHttpServiceHandler handler,
                                                                       javax.net.ssl.SSLContext sslContext,
                                                                       org.apache.http.impl.nio.reactor.SSLIOSessionHandler sslioSessionHandler,
                                                                       org.apache.http.params.HttpParams params)

init

public void init(ConfigurationContext cfgCtx,
                 TransportInDescription transprtIn)
          throws AxisFault
Initialize the transport listener, and execute reactor in new seperate thread

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

getServiceEPRPrefix

protected java.lang.String getServiceEPRPrefix(ConfigurationContext cfgCtx,
                                               java.lang.String host,
                                               int port)
Return the EPR prefix for services made available over this transport

Returns:

getSSLContext

protected javax.net.ssl.SSLContext getSSLContext(TransportInDescription transportIn)
                                          throws AxisFault
Create the SSLContext to be used by this listener

Parameters:
transportIn -
Returns:
always null
Throws:
AxisFault

start

public void start()
           throws AxisFault
Start the transport listener on a new thread

Specified by:
start in interface TransportListener
Throws:
AxisFault

stop

public void stop()
          throws AxisFault
Stop the listener

Specified by:
stop in interface TransportListener
Throws:
AxisFault - on error

getEPRForService

public EndpointReference getEPRForService(java.lang.String serviceName,
                                          java.lang.String ip)
                                   throws AxisFault
Return the EPR for the given service (implements deprecated method temporarily)

Specified by:
getEPRForService in interface TransportListener
Throws:
AxisFault

getEPRsForService

public EndpointReference[] getEPRsForService(java.lang.String serviceName,
                                             java.lang.String ip)
                                      throws AxisFault
Return the EPRs for the given service over this transport

Specified by:
getEPRsForService in interface TransportListener
Parameters:
serviceName - name of the service
ip - IP address
Returns:
the EndpointReferences for this service over the transport
Throws:
AxisFault - on error

getSessionContext

public SessionContext getSessionContext(MessageContext messageContext)
TODO: Return session context from transport, this is an improvement in axis2 1.2 and is not currently supported

Specified by:
getSessionContext in interface TransportListener
Parameters:
messageContext -
Returns:

destroy

public void destroy()
Specified by:
destroy in interface TransportListener


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