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

Variable Index

 o routes
The server routing table.
 o s
The server socket.

Constructor Index

 o GenericServer(int)
Creates a new GenericServer that listens on a specified port.

Method Index

 o main(String[])
Starts a new GenericServer listening on the specified port.
 o run()
Accepts new client connections and passes them on to new GenericHandlers for processing.

Variables

 o s
  protected ServerSocket s
The server socket.
 o routes
  protected Hashtable routes
The server routing table.

Constructors

 o 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.

Methods

 o 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
 o 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