com.objectwave.simpleSockets
Class Gateway

java.lang.Object
  |
  +--com.objectwave.simpleSockets.SimpleServer
        |
        +--com.objectwave.simpleSockets.Gateway
All Implemented Interfaces:
java.lang.Runnable

public class Gateway
extends SimpleServer

A server that can sit between a client and a server to look like that server. This allows * us to capture byte related information about the communication between a client and a server. * SystemProperties are used to configure server. * ow.gatewayHost='The Host We are to emulate' * ow.gatewayPort='The port we are to connect on to the host' * and a command line argument of the port this server is suppose to listen for client requests

Version:
$Id: Gateway.java,v 2.0 2001/06/11 15:46:53 dave_hoag Exp $
Author:
dhoag

Field Summary
 
Fields inherited from class com.objectwave.simpleSockets.SimpleServer
count
 
Constructor Summary
Gateway()
           
Gateway(int port)
           
 
Method Summary
 ServeClient getClientServer(SimpleServer svr, int count, java.lang.Thread thread)
          Override this method if you don't want to do anything special with the * handling of clients.
 java.net.Socket getTargetSocket()
           
static void main(java.lang.String[] args)
          This method should be overriden to create an instance * of your SimpleServer.
 
Methods inherited from class com.objectwave.simpleSockets.SimpleServer
errorlog, getClientServer, getClientThreadPriority, handleConnection, port, run, startServer, startThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gateway

public Gateway()

Gateway

public Gateway(int port)
Parameters:
port -
Method Detail

main

public static void main(java.lang.String[] args)
This method should be overriden to create an instance * of your SimpleServer. It should look the same xcept it should * Specify new .startServer();

Parameters:
args -

getTargetSocket

public java.net.Socket getTargetSocket()
                                throws java.net.UnknownHostException,
                                       java.io.IOException
Returns:
The TargetSocket value
Throws:
java.net.UnknownHostException
java.io.IOException

getClientServer

public ServeClient getClientServer(SimpleServer svr,
                                   int count,
                                   java.lang.Thread thread)
Override this method if you don't want to do anything special with the * handling of clients. Just return your ServerClient object.

Overrides:
getClientServer in class SimpleServer
Parameters:
svr -
count -
thread -
Returns:
The ClientServer value