org.apache.axis.transport.http
Class SimpleAxisServer

java.lang.Object
  |
  +--org.apache.axis.transport.http.SimpleAxisServer
All Implemented Interfaces:
java.lang.Runnable

public class SimpleAxisServer
extends java.lang.Object
implements java.lang.Runnable

This is a simple implementation of an HTTP server for processing SOAP requests via Apache's xml-axis. This is not intended for production use. Its intended uses are for demos, debugging, and performance profiling.

Author:
Sam Ruby (ruby@us.ibm.com), Rob Jellinghaus (robj@unrealities.com), Alireza Taherkordi (a_taherkordi@users.sourceforge.net)

Field Summary
protected static org.apache.commons.logging.Log log
           
static int MAX_SESSIONS_DEFAULT
           
static int sessionIndex
           
 
Constructor Summary
SimpleAxisServer()
           
SimpleAxisServer(int maxPoolSize)
           
SimpleAxisServer(int maxPoolSize, int maxSessions)
          Constructor
 
Method Summary
protected  Session createSession(java.lang.String cooky)
           
 AxisServer getAxisServer()
           
 boolean getDoThreads()
           
 int getMaxSessions()
           
 EngineConfiguration getMyConfig()
           
static ThreadPool getPool()
           
 java.net.ServerSocket getServerSocket()
          Obtain the serverSocket that that SimpleAxisServer is listening on.
protected  boolean isSessionUsed()
           
static void main(java.lang.String[] args)
          Server process.
 void run()
          Accept requests from a given TCP port and send them through the Axis engine for processing.
 void setDoThreads(boolean value)
           
 void setMaxSessions(int maxSessions)
           
 void setMyConfig(EngineConfiguration myConfig)
           
 void setServerSocket(java.net.ServerSocket serverSocket)
          Set the serverSocket this server should listen on.
 void start()
          Start this server as a NON-daemon.
 void start(boolean daemon)
          Start this server.
 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

log

protected static org.apache.commons.logging.Log log

MAX_SESSIONS_DEFAULT

public static final int MAX_SESSIONS_DEFAULT

sessionIndex

public static int sessionIndex
Constructor Detail

SimpleAxisServer

public SimpleAxisServer()

SimpleAxisServer

public SimpleAxisServer(int maxPoolSize)
Parameters:
maxPoolSize - maximum thread pool size

SimpleAxisServer

public SimpleAxisServer(int maxPoolSize,
                        int maxSessions)
Constructor
Parameters:
maxSessions - maximum sessions
Method Detail

getPool

public static ThreadPool getPool()

getMaxSessions

public int getMaxSessions()

setMaxSessions

public void setMaxSessions(int maxSessions)
Parameters:
maxSessions - maximum sessions

isSessionUsed

protected boolean isSessionUsed()

setDoThreads

public void setDoThreads(boolean value)

getDoThreads

public boolean getDoThreads()

getMyConfig

public EngineConfiguration getMyConfig()

setMyConfig

public void setMyConfig(EngineConfiguration myConfig)

createSession

protected Session createSession(java.lang.String cooky)

getAxisServer

public AxisServer getAxisServer()

run

public void run()
Accept requests from a given TCP port and send them through the Axis engine for processing.
Specified by:
run in interface java.lang.Runnable

getServerSocket

public java.net.ServerSocket getServerSocket()
Obtain the serverSocket that that SimpleAxisServer is listening on.

setServerSocket

public void setServerSocket(java.net.ServerSocket serverSocket)
Set the serverSocket this server should listen on. (note : changing this will not affect a running server, but if you stop() and then start() the server, the new socket will be used).

start

public void start(boolean daemon)
           throws java.lang.Exception
Start this server. Spawns a worker thread to listen for HTTP requests.
Parameters:
daemon - a boolean indicating if the thread should be a daemon.

start

public void start()
           throws java.lang.Exception
Start this server as a NON-daemon.

stop

public void stop()
          throws java.lang.Exception
Stop this server. This will interrupt any pending accept().

main

public static void main(java.lang.String[] args)
Server process.


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