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 single threaded 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)

Field Summary
static boolean doSessions
           
static int sessionIndex
           
 
Constructor Summary
SimpleAxisServer()
           
 
Method Summary
 java.net.ServerSocket getServerSocket()
          Obtain the serverSocket that that SimpleAxisServer is listening on.
static void main(java.lang.String[] args)
          Server process.
 boolean matches(byte[] buf, byte[] target)
          does tolower[buf] match the target byte array, up to the target's length?
 void run()
          The main workhorse method.
 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

doSessions

public static boolean doSessions

sessionIndex

public static int sessionIndex
Constructor Detail

SimpleAxisServer

public SimpleAxisServer()
Method Detail

run

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

matches

public boolean matches(byte[] buf,
                       byte[] target)
does tolower[buf] match the target byte array, up to the target's length?

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 © 2001 Apache XML Project. All Rights Reserved.