public class DistributedListServer extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
protected ChannelFactory |
cf |
static int |
DEFAULT_PORT |
protected java.util.List<edu.jas.util.Broadcaster> |
servers |
protected java.util.SortedMap<edu.jas.util.Counter,java.lang.Object> |
theList |
| Constructor and Description |
|---|
DistributedListServer()
Constructs a new DistributedListServer.
|
DistributedListServer(ChannelFactory cf)
DistributedListServer.
|
DistributedListServer(int port)
DistributedListServer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
init()
thread initialization and start.
|
static void |
main(java.lang.String[] args)
main.
|
void |
run()
main server method.
|
int |
size()
number of servers.
|
void |
terminate()
terminate all servers.
|
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, toString, yieldpublic static final int DEFAULT_PORT
protected final ChannelFactory cf
protected java.util.List<edu.jas.util.Broadcaster> servers
protected final java.util.SortedMap<edu.jas.util.Counter,java.lang.Object> theList
public DistributedListServer()
public DistributedListServer(int port)
port - to run server on.public DistributedListServer(ChannelFactory cf)
cf - ChannelFactory to use.public static void main(java.lang.String[] args) throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void init()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void terminate()
public int size()