edu.internet2.middleware.grouper.ws.util
Class TcpCaptureServer

java.lang.Object
  extended by edu.internet2.middleware.grouper.ws.util.TcpCaptureServer

public class TcpCaptureServer
extends java.lang.Object

A TCP capture server listening on the port, forwards requests to another port, and relays info back, while keeping track of the request and response.


Constructor Summary
TcpCaptureServer()
           
 
Method Summary
 java.lang.String getRequest()
          get the response string
 java.lang.String getResponse()
          get the repsonse string
 void ServiceConnection(java.net.Socket client, int socketId, int portToConnect)
          service a socket connection to server
 void startServer(int portListen, int portConnect)
          start the server
 java.lang.Thread startServer(int portListen, int portConnect, boolean executeInThread)
          start the server
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpCaptureServer

public TcpCaptureServer()
Method Detail

startServer

public java.lang.Thread startServer(int portListen,
                                    int portConnect,
                                    boolean executeInThread)
start the server

Parameters:
portListen -
portConnect -
executeInThread - true to spawn a thread
Returns:
thread if started one

startServer

public void startServer(int portListen,
                        int portConnect)
start the server

Parameters:
portListen -
portConnect -

ServiceConnection

public void ServiceConnection(java.net.Socket client,
                              int socketId,
                              int portToConnect)
                       throws java.io.IOException
service a socket connection to server

Parameters:
client -
socketId -
portToConnect -
Throws:
java.io.IOException

getRequest

public java.lang.String getRequest()
get the response string

Returns:
repsonse string

getResponse

public java.lang.String getResponse()
get the repsonse string

Returns:
the response string