Class TcpCaptureServer

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

public class TcpCaptureServer extends 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 Details

    • TcpCaptureServer

      public TcpCaptureServer()
  • Method Details

    • startServer

      public 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(Socket client, int socketId, int portToConnect) throws IOException
      service a socket connection to server
      Parameters:
      client -
      socketId -
      portToConnect -
      Throws:
      IOException
    • getRequest

      public String getRequest()
      get the response string
      Returns:
      repsonse string
    • getResponse

      public String getResponse()
      get the repsonse string
      Returns:
      the response string