Class ExecutableServer
java.lang.Object
java.lang.Thread
edu.jas.util.ExecutableServer
- All Implemented Interfaces:
Runnable
ExecutableServer is used to receive and execute classes.
- Author:
- Heinz Kredel
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ChannelFactoryChannelFactory to use.static final intDefault port to listen to.static final StringConstant to signal completion.protected List<edu.jas.util.Executor> List of server threads.static final StringConstant to request shutdown.Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionExecutableServer on default port.ExecutableServer(int port) ExecutableServer.ExecutableServer. -
Method Summary
Methods inherited from class Thread
activeCount, checkAccess, clone, 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, yield
-
Field Details
-
cf
ChannelFactory to use. -
servers
List of server threads. -
DEFAULT_PORT
public static final int DEFAULT_PORTDefault port to listen to.- See Also:
-
DONE
-
STOP
-
-
Constructor Details
-
ExecutableServer
public ExecutableServer()ExecutableServer on default port. -
ExecutableServer
public ExecutableServer(int port) ExecutableServer.- Parameters:
port-
-
ExecutableServer
ExecutableServer.- Parameters:
cf- channel factory to reuse.
-
-
Method Details
-
main
main method to start serving thread.- Parameters:
args- args[0] is port- Throws:
InterruptedException
-
init
public void init()thread initialization and start. -
size
public int size()number of servers. -
run
-
terminate
public void terminate()terminate all servers. -
toString
-