|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis.transport.http.SimpleAxisServer
org.apache.ws.util.test.axis.NotSoSimpleAxisServer
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.
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. TODO: delete any methods that can be safely inherited from superclass
Field Summary | |
static java.io.File |
DEFAULT_DOC_ROOT_DIR
|
static int |
DEFAULT_MAX_SESSIONS
|
static int |
DEFAULT_MAX_THREADS
|
protected static org.apache.commons.logging.Log |
LOG
|
static int |
sessionIndex
|
Fields inherited from class org.apache.axis.transport.http.SimpleAxisServer |
log, MAX_SESSIONS_DEFAULT |
Constructor Summary | |
NotSoSimpleAxisServer()
Create a server with default options. |
|
NotSoSimpleAxisServer(java.io.File docRootDir)
Create a server with the specified docRoot. |
|
NotSoSimpleAxisServer(java.io.File docRootDir,
int maxPoolSize)
Create a server with the specified docRoot and max threads. |
|
NotSoSimpleAxisServer(java.io.File docRootDir,
int maxPoolSize,
int maxSessions)
Create a server with the specified docRoot, max threads, and max sessions. |
Method Summary | |
protected org.apache.axis.session.Session |
createSession(java.lang.String cooky)
demand create a session if there is not already one for the string |
protected void |
finalize()
stop the server if not already told to. |
org.apache.axis.server.AxisServer |
getAxisServer()
demand create an axis server; return an existing one if one exists. |
boolean |
getDoThreads()
|
int |
getMaxSessions()
get max session count |
org.apache.axis.EngineConfiguration |
getMyConfig()
|
static org.apache.axis.components.threadpool.ThreadPool |
getPool()
get the thread pool |
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)
turn threading on or off. |
void |
setMaxSessions(int maxSessions)
Resize the session map |
void |
setMyConfig(org.apache.axis.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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.io.File DEFAULT_DOC_ROOT_DIR
public static final int DEFAULT_MAX_THREADS
public static final int DEFAULT_MAX_SESSIONS
protected static final org.apache.commons.logging.Log LOG
public static int sessionIndex
Constructor Detail |
public NotSoSimpleAxisServer()
public NotSoSimpleAxisServer(java.io.File docRootDir)
public NotSoSimpleAxisServer(java.io.File docRootDir, int maxPoolSize)
public NotSoSimpleAxisServer(java.io.File docRootDir, int maxPoolSize, int maxSessions)
Method Detail |
public static org.apache.axis.components.threadpool.ThreadPool getPool()
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public int getMaxSessions()
public void setMaxSessions(int maxSessions)
maxSessions
- maximum sessionsprotected boolean isSessionUsed()
public void setDoThreads(boolean value)
value
- public boolean getDoThreads()
public org.apache.axis.EngineConfiguration getMyConfig()
public void setMyConfig(org.apache.axis.EngineConfiguration myConfig)
protected org.apache.axis.session.Session createSession(java.lang.String cooky)
cooky
-
public org.apache.axis.server.AxisServer getAxisServer()
public void run()
run
in interface java.lang.Runnable
public java.net.ServerSocket getServerSocket()
public void setServerSocket(java.net.ServerSocket serverSocket)
public void start(boolean daemon) throws java.lang.Exception
daemon
- a boolean indicating if the thread should be a daemon.
java.lang.Exception
public void start() throws java.lang.Exception
java.lang.Exception
public void stop()
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |