org.jibx.ws.tcp.server
Class TcpServer

java.lang.Object
  extended by java.lang.Thread
      extended by org.jibx.ws.tcp.server.TcpServer
All Implemented Interfaces:
Runnable

public final class TcpServer
extends Thread

Server implementation for TCP protocol using DIME message exchange. A separate instance of this class is created for each service. As connections are made to the service socket an instance of the SocketRunner class and an associated runner thread is created for each accepted connection.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static void main(String[] args)
          Main method used to run the server.
 void run()
          Thread execution method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

run

public void run()
Thread execution method. The execution loop is simple, consisting of the thread waiting for an incoming connection and then spawning off a separate thread and a SocketRunner instance for each accepted connection.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

main

public static void main(String[] args)
Main method used to run the server. This takes arguments of the form 'def-path=port#', where 'def-path' is the path to the service definition file and 'port#' is the corresponding service port number.

Parameters:
args - command line args


Project Web Site