org.apache.axis2.transport.http
Class SimpleHTTPServer

java.lang.Object
  extended byorg.apache.axis2.transport.http.SimpleHTTPServer
All Implemented Interfaces:
TransportListener

public class SimpleHTTPServer
extends Object
implements TransportListener

This is a simple implementation of an HTTP server for processing SOAP requests via Apache's xml-axis2. This is not intended for production use. Its intended uses are for demos, debugging, and performance profiling. Note this classes uses static objects to provide a thread pool, so you should not use multiple instances of this class in the same JVM/classloader unless you want bad things to happen at shutdown.


Field Summary
protected  ConfigurationContext configurationContext
          Field systemContext
static int DEFAULT_PORT
           
 
Fields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT
 
Constructor Summary
SimpleHTTPServer()
           
SimpleHTTPServer(ConfigurationContext systemContext, int port)
           
SimpleHTTPServer(ConfigurationContext systemContext, int port, ThreadFactory pool)
          Constructor SimpleHTTPServer
 
Method Summary
 ConfigurationContext getConfigurationContext()
          Method getConfigurationContext
 EndpointReference getEPRForService(String serviceName, String ip)
          replyToEPR If the user has given host address paramter then it gets the high priority and ERP will be creatd using that N:B - hostAddress should be a complte url (http://www.myApp.com/ws)
 void init(ConfigurationContext axisConf, TransportInDescription transprtIn)
          init method in TransportListener
 boolean isRunning()
          Checks if this HTTP server instance is running.
static void main(String[] args)
          Method main
static void printUsage()
           
 void start()
          Start this server as a NON-daemon.
 void stop()
          Stop this server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static int DEFAULT_PORT

configurationContext

protected ConfigurationContext configurationContext
Field systemContext

Constructor Detail

SimpleHTTPServer

public SimpleHTTPServer()

SimpleHTTPServer

public SimpleHTTPServer(ConfigurationContext systemContext,
                        int port)
                 throws AxisFault

SimpleHTTPServer

public SimpleHTTPServer(ConfigurationContext systemContext,
                        int port,
                        ThreadFactory pool)
                 throws AxisFault
Constructor SimpleHTTPServer

Parameters:
systemContext -
pool -
Method Detail

init

public void init(ConfigurationContext axisConf,
                 TransportInDescription transprtIn)
          throws AxisFault
init method in TransportListener

Specified by:
init in interface TransportListener
Parameters:
axisConf -
transprtIn -
Throws:
AxisFault

main

public static void main(String[] args)
                 throws Exception
Method main

Parameters:
args -
Throws:
Exception

printUsage

public static void printUsage()

start

public void start()
           throws AxisFault
Start this server as a NON-daemon.

Specified by:
start in interface TransportListener
Throws:
AxisFault

stop

public void stop()
Stop this server. Can be called safely if the system is already stopped, or if it was never started. This will interrupt any pending accept().

Specified by:
stop in interface TransportListener

getConfigurationContext

public ConfigurationContext getConfigurationContext()
Method getConfigurationContext

Returns:
the system context

getEPRForService

public EndpointReference getEPRForService(String serviceName,
                                          String ip)
                                   throws AxisFault
replyToEPR If the user has given host address paramter then it gets the high priority and ERP will be creatd using that N:B - hostAddress should be a complte url (http://www.myApp.com/ws)

Specified by:
getEPRForService in interface TransportListener
Parameters:
serviceName -
ip -
Returns:
an EndpointReference
Throws:
AxisFault
See Also:
TransportListener.getEPRForService(String,String)

isRunning

public boolean isRunning()
Checks if this HTTP server instance is running.

Returns:
true/false