Class ExecutableServer
java.lang.Object
java.lang.Thread
edu.jas.util.ExecutableServer
- All Implemented Interfaces:
Runnable
ExecutableServer is used to receive and execute classes.
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ChannelFactoryChannelFactory to use.private static final booleanstatic final intDefault port to listen to.static final StringConstant to signal completion.private booleanprivate static final org.apache.logging.log4j.Loggerprivate ThreadList 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
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
cf
ChannelFactory to use. -
servers
-
DEFAULT_PORT
public static final int DEFAULT_PORTDefault port to listen to.- See Also:
-
DONE
-
STOP
-
goon
private volatile boolean goon -
mythread
-
-
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
-