public class Server
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List |
clientConnections
The live
ClientConnections in this server |
protected static java.lang.Throwable |
serverError
An exception thrown in the server thread
|
| 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.
|
java.lang.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 java.lang.Throwable serverError
protected java.util.List clientConnections
ClientConnections in this serverpublic Server(int port)
Server that listens on the given
port.public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void close()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic java.lang.String toString()
Server.toString in class java.lang.ThreadCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.