com.msi.network.server
Class adminTCPServer

java.lang.Object
  extended bycom.msi.network.server.TCPServer
      extended bycom.msi.network.server.adminTCPServer
All Implemented Interfaces:
java.lang.Runnable, ServerConstants

public class adminTCPServer
extends TCPServer

The adminTCPServer is a TCPServer that contains another TCPServer. The TCPServer contained is run in a separate thread and provides the actual client services. The adminTCPServer provides control and administration services.

Methods are provided to access and control server operation.

Successful operation requires that the RHFactory be properly configured before the adminTCPServer is instantiated. A simple example:

 public class echoServer extends adminTCPServer {
 
   public echoServer (int port, int adminport) {
     super(port, adminport);
   }
 
   public static void main(String args[]) {
     int myport = 7654;
     try {
       myport = Integer.parseInt(args[0]);
     } catch (Exception e) {     }
     echoRHBuilder builder = new echoRHBuilder();
     RHFactory.registerBuilder(builder, myport);
     echoRHBuilder adminbuilder = new echoRHBuilder();
     RHFactory.registerBuilder(adminbuilder, myport+1);
 
     echoServer echo = new echoServer(myport, myport+1);
   }
 }

Version:
1.0
Author:
Ken Thompson

Field Summary
protected static TCPServer adminServer
          Describe variable adminServer here.
protected static TCPServer clientServer
          Describe variable clientServer here.
 
Fields inherited from class com.msi.network.server.TCPServer
kicker, maxServers, port, TCPif
 
Fields inherited from interface com.msi.network.server.ServerConstants
defaultMaxServers, serverSamplePeriod
 
Constructor Summary
adminTCPServer(int port, int adminport)
          Set up the internal state and startup using the given port.
 
Method Summary
static TCPServer getAdminServer()
          Allow access to the admin server.
static TCPServer getClientServer()
          Allow access to the client server.
 
Methods inherited from class com.msi.network.server.TCPServer
finalize, getMaxServers, isIsSSL, isOnLine, run, runServer, setIsSSL, setMaxServers, setOnLine, start, statsString, stop
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clientServer

protected static TCPServer clientServer
Describe variable clientServer here.


adminServer

protected static TCPServer adminServer
Describe variable adminServer here.

Constructor Detail

adminTCPServer

public adminTCPServer(int port,
                      int adminport)
Set up the internal state and startup using the given port.

Parameters:
port - TCP/IP port for communication with the client.
adminport - an int value
Method Detail

getClientServer

public static TCPServer getClientServer()
Allow access to the client server.

Returns:
TCPServer.

getAdminServer

public static TCPServer getAdminServer()
Allow access to the admin server.

Returns:
TCPServer.


Copyright © 2001-2002 MileStone Solutions, Inc. All Rights Reserved.