Class prominence.msg.GenericServer
All Packages Class Hierarchy This Package Previous Next Index
Class prominence.msg.GenericServer
java.lang.Object
|
+----java.lang.Thread
|
+----prominence.msg.GenericServer
- public class GenericServer
- extends Thread
A generic message streams-based server.
Accepts connections from GenericClients and passes them on
to GenericHandlers for processing.
- See Also:
- GenericHandler, GenericClient
-
routes
- The server routing table.
-
s
- The server socket.
-
GenericServer(int)
- Creates a new GenericServer that listens on a specified port.
-
main(String[])
- Starts a new GenericServer listening on the specified port.
-
run()
- Accepts new client connections and passes them on to
new GenericHandlers for processing.
s
protected ServerSocket s
- The server socket.
routes
protected Hashtable routes
- The server routing table.
GenericServer
public GenericServer(int port) throws IOException
- Creates a new GenericServer that listens on a specified port.
- Parameters:
- port - The port to listen on
- Throws: IOException
- Occurs if the ServerSocket could not
be opened.
run
public void run()
- Accepts new client connections and passes them on to
new GenericHandlers for processing.
This method is called by a new thread when the superclass
start() method is called.
- Overrides:
- run in class Thread
- See Also:
- start
main
public static void main(String args[]) throws IOException
- Starts a new GenericServer listening on the specified port.
Syntax:
java prominence.msg.GenericServer <port>
- Throws: IOException
- Occurs when the ServerSocket cannot
be opened.
All Packages Class Hierarchy This Package Previous Next Index