comm
Class ExecutableServer

java.lang.Object
  extended by java.lang.Thread
      extended by comm.ExecutableServer
All Implemented Interfaces:
java.lang.Runnable

public class ExecutableServer
extends java.lang.Thread

Class ExecutableServer Used to receive and execute objects.

Author:
Heinz Kredel.

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  ChannelFactory cf
           
static int DEFAULT_PORT
          DEFAULT_PORT to listen to.
static java.lang.String DONE
           
private  boolean goon
           
private static Logger logger
           
private  java.lang.Thread mythread
           
protected  java.util.ArrayList servers
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ExecutableServer()
           
ExecutableServer(ChannelFactory cf)
           
ExecutableServer(int port)
           
 
Method Summary
 void init()
          Thread initialization and start.
static void main(java.lang.String[] args)
          Main method to start serving thread.
 void run()
          Accept channels and setup of executor threads.
 int size()
          Number of servers.
 void terminate()
          Terminate all servers.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static Logger logger

DEFAULT_PORT

public static final int DEFAULT_PORT
DEFAULT_PORT to listen to.

See Also:
Constant Field Values

DONE

public static final java.lang.String DONE
See Also:
Constant Field Values

cf

protected final ChannelFactory cf

servers

protected java.util.ArrayList servers

goon

private boolean goon

mythread

private java.lang.Thread mythread
Constructor Detail

ExecutableServer

public ExecutableServer()

ExecutableServer

public ExecutableServer(int port)
Parameters:
port - to listen on.

ExecutableServer

public ExecutableServer(ChannelFactory cf)
Parameters:
cf - (re)use this ChannelFactory.
Method Detail

main

public static void main(java.lang.String[] args)
Main method to start serving thread.

Parameters:
args - args[0] is port.

init

public void init()
Thread initialization and start.


size

public int size()
Number of servers.


run

public void run()
Accept channels and setup of executor threads.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

terminate

public void terminate()
Terminate all servers.