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.
-
in
-
-
out
-
-
parent
-
-
tag
-
-
CaptureReplaySocket(InetAddress, int, Collobject, String)
-
-
CaptureReplaySocket(Socket, Collobject, String)
-
-
CaptureReplaySocket(String, int, Collobject, String)
-
-
close()
- Closes the socket
-
getInetAddress()
-
-
getInputStream()
-
-
getLocalPort()
-
-
getOutputStream()
-
-
getPort()
-
-
init(Collobject, String)
-
-
queryTag()
-
-
startCaptureInput(OutputStream)
-
-
startCaptureOutput(OutputStream)
-
-
toString()
-
in
protected InputStream in
out
protected OutputStream out
parent
protected Collobject parent
tag
protected String tag
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
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
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
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
close
public void close() throws IOException
- Closes the socket
- Throws: IOException
- thown if unable to open the socket
- Overrides:
- close in class HabaneroSocket
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
getInputStream
public InputStream getInputStream()
- Returns:
- returns the input stream
- Overrides:
- getInputStream in class HabaneroSocket
getLocalPort
public int getLocalPort()
- Returns:
- the port number that we are using
- Overrides:
- getLocalPort in class HabaneroSocket
getOutputStream
public OutputStream getOutputStream()
- Returns:
- returns the output stream
- Overrides:
- getOutputStream in class HabaneroSocket
getPort
public int getPort()
- Returns:
- the port number that the connection is using at the far end
- Overrides:
- getPort in class HabaneroSocket
toString
public String toString()
- Returns:
- returns a string representing the socket
- Overrides:
- toString in class HabaneroSocket
startCaptureInput
public void startCaptureInput(OutputStream recorder) throws IOException
- Parameters:
- recorder - the recording stream
- Returns:
- starts recording the incoming data into recorder
startCaptureOutput
public void startCaptureOutput(OutputStream recorder) throws IOException
- Parameters:
- recorder - the recording stream
- Returns:
- starts recording the outgoing data into recorder
queryTag
public String queryTag()
- Returns:
- the socket's tag
All Packages Class Hierarchy This Package Previous Next Index