All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.streams.CaptureReplaySocket

java.lang.Object
   |
   +----ncsa.habanero.streams.HabaneroSocket
           |
           +----ncsa.habanero.streams.CaptureReplaySocket

public class CaptureReplaySocket
extends HabaneroSocket
CaptureReplaySocket holds a socket that can capture and replay the information that is written to it.


Variable Index

 o in
 o out
 o parent
 o tag

Constructor Index

 o CaptureReplaySocket(InetAddress, int, Collobject, String)
 o CaptureReplaySocket(Socket, Collobject, String)
 o CaptureReplaySocket(String, int, Collobject, String)

Method Index

 o close()
Closes the socket
 o getInetAddress()
 o getInputStream()
 o getLocalPort()
 o getOutputStream()
 o getPort()
 o init(Collobject, String)
 o queryTag()
 o startCaptureInput(OutputStream)
 o startCaptureOutput(OutputStream)
 o toString()

Variables

 o in
 protected InputStream in
 o out
 protected OutputStream out
 o parent
 protected Collobject parent
 o tag
 protected String tag

Constructors

 o CaptureReplaySocket
 public CaptureReplaySocket(InetAddress address,
                            int port,
                            Collobject parent,
                            String strTag) throws IOException
Parameters:
address - address of the socket
port - port to be used for the socket
Throws: IOException
thrown if unable to open the socket
 o CaptureReplaySocket
 public CaptureReplaySocket(String host,
                            int port,
                            Collobject parent,
                            String strTag) throws IOException, UnknownHostException
Parameters:
host - the name of the host machine
port - port to be used for the socket
parent - the collobject that is associated with this socket
strTag - the socket's tag
Throws: IOException
thrown if unable to open the socket
Throws: UnknownHostException
thrown if unable to find the host
 o CaptureReplaySocket
 public CaptureReplaySocket(Socket newSocket,
                            Collobject parent,
                            String strTag) throws IOException, UnknownHostException
Parameters:
newSocket - the socket that will be wrapped inside this
parent - the collobject that is associated with this socket
strTag - the socket's tag
Throws: IOException
thrown if unable to open the socket
Throws: UnknownHostException
thrown if unable to find the host

Methods

 o init
 protected void init(Collobject parentCollobject,
                     String strTag) throws IOException
Parameters:
parentCollobject - the collobject that created the socket
strTag - the socket's tag
Throws: IOException
thown if unable to open the socket
 o close
 public void close() throws IOException
Closes the socket

Throws: IOException
thown if unable to open the socket
Overrides:
close in class HabaneroSocket
 o getInetAddress
 public InetAddress getInetAddress()
Returns:
returns InetAddress that the socket is connected to
Throws: UnknownHostException
thrown when the local host is unknown???
Overrides:
getInetAddress in class HabaneroSocket
 o getInputStream
 public InputStream getInputStream()
Returns:
returns the input stream
Overrides:
getInputStream in class HabaneroSocket
 o getLocalPort
 public int getLocalPort()
Returns:
the port number that we are using
Overrides:
getLocalPort in class HabaneroSocket
 o getOutputStream
 public OutputStream getOutputStream()
Returns:
returns the output stream
Overrides:
getOutputStream in class HabaneroSocket
 o getPort
 public int getPort()
Returns:
the port number that the connection is using at the far end
Overrides:
getPort in class HabaneroSocket
 o toString
 public String toString()
Returns:
returns a string representing the socket
Overrides:
toString in class HabaneroSocket
 o startCaptureInput
 public void startCaptureInput(OutputStream recorder) throws IOException
Parameters:
recorder - the recording stream
Returns:
starts recording the incoming data into recorder
 o startCaptureOutput
 public void startCaptureOutput(OutputStream recorder) throws IOException
Parameters:
recorder - the recording stream
Returns:
starts recording the outgoing data into recorder
 o queryTag
 public String queryTag()
Returns:
the socket's tag

All Packages  Class Hierarchy  This Package  Previous  Next  Index