Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected List |
clientConnections
The live
ClientConnections in this server |
protected static Throwable |
serverError
An exception thrown in the server thread
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
Server(int port)
Creates a new
Server that listens on the given
port. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Stops this server.
|
void |
run()
Listens for clients to connect and services the connections
appropriately.
|
String |
toString()
Returns a brief description of this
Server. |
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, yieldprotected static Throwable serverError
protected List clientConnections
ClientConnections in this serverpublic Server(int port)
Server that listens on the given
port.public void run()
public void close()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.