|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
edu.jas.util.ExecutableServer
public class ExecutableServer
ExecutableServer is used to receive and execute classes.
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
ChannelFactory to use. |
static int |
DEFAULT_PORT
Default port to listen to. |
static java.lang.String |
DONE
Constant to signal completion. |
protected java.util.List<edu.jas.util.Executor> |
servers
List of server threads. |
static java.lang.String |
STOP
Constant to request shutdown. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ExecutableServer()
ExecutableServer on default port. |
|
ExecutableServer(ChannelFactory cf)
ExecutableServer. |
|
ExecutableServer(int port)
ExecutableServer. |
Method Summary | |
---|---|
void |
init()
thread initialization and start. |
static void |
main(java.lang.String[] args)
main method to start serving thread. |
void |
run()
run is main server method. |
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 |
---|
protected final ChannelFactory cf
protected java.util.List<edu.jas.util.Executor> servers
public static final int DEFAULT_PORT
public static final java.lang.String DONE
public static final java.lang.String STOP
Constructor Detail |
---|
public ExecutableServer()
public ExecutableServer(int port)
port
- public ExecutableServer(ChannelFactory cf)
cf
- channel factory to reuse.Method Detail |
---|
public static void main(java.lang.String[] args)
args
- args[0] is portpublic void init()
public int size()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void terminate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |