|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Thread
fang.HttpServer
public class HttpServer
This establishes incoming connections and directs them to the appropriate GameConnection. The Server can be run continually on a dedicated computer to serve all multiclient games.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
PORT
port on which to run the server |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
HttpServer()
the constructor to use in applications |
|
HttpServer(Object dummy)
the constructor to use when using pipes |
|
| Method Summary | |
|---|---|
void |
connect()
connects to a client and forwards the connections to the proper GameConnection |
void |
disconnect()
stops the loop from accepting new connections |
ObjectInputStream |
getPipedInput()
makes a piped input stream to use in applets |
ObjectOutputStream |
getPipedOutput()
makes a piped output stream to use in applets |
static void |
main(String[] argv)
starts the server accepting new connections |
void |
run()
starts the pipes for applets, or the server for applications |
void |
startPipes()
starts pipe communications |
| 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 |
|---|
public static int PORT
| Constructor Detail |
|---|
public HttpServer(Object dummy)
public HttpServer()
throws IOException
IOException| Method Detail |
|---|
public ObjectInputStream getPipedInput()
public ObjectOutputStream getPipedOutput()
public void startPipes()
public void connect()
Exception - if an error occurs while establishing the initial connectionspublic void disconnect()
public void run()
run in interface Runnablerun in class ThreadRunnable.run()
public static void main(String[] argv)
throws IOException
argv - not used
IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||