All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.streams.HabaneroSocket
java.lang.Object
|
+----ncsa.habanero.streams.HabaneroSocket
- public class HabaneroSocket
- extends Object
HabaneroSocket holds a socket and allows the
socket to be recorded from.
-
socket
-
-
HabaneroSocket(InetAddress, int)
-
-
HabaneroSocket(InetAddress, int, Collobject)
-
-
HabaneroSocket(Socket)
-
-
HabaneroSocket(String, int)
-
-
HabaneroSocket(String, int, Collobject)
-
-
close()
-
-
getInetAddress()
-
-
getInputStream()
-
-
getLocalPort()
-
-
getOutputStream()
-
-
getPort()
-
-
setSocketImplFactory(SocketImplFactory)
-
-
toString()
-
socket
protected Socket socket
HabaneroSocket
public HabaneroSocket(InetAddress address,
int port) 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
HabaneroSocket
public HabaneroSocket(InetAddress address,
int port,
Collobject co) throws IOException
- Parameters:
- address - address of the socket
- port - port to be used for the socket
- co - the parent collobject
- Throws: IOException
- thrown if unable to open the socket
HabaneroSocket
public HabaneroSocket(String host,
int port) throws IOException, UnknownHostException
- Parameters:
- host - the name of the host machine
- port - port to be used for the socket
- Throws: IOException
- thrown if unable to open the socket
- Throws: UnknownHostException
- thrown if unable to find the host
HabaneroSocket
public HabaneroSocket(String host,
int port,
Collobject co) throws IOException, UnknownHostException
- Parameters:
- host - the name of the host machine
- port - port to be used for the socket
- co - the parent collobject
- Throws: IOException
- thrown if unable to open the socket
- Throws: UnknownHostException
- thrown if unable to find the host
HabaneroSocket
public HabaneroSocket(Socket newSocket) throws IOException
- Parameters:
- newSocket - the socket that will be wrapped inside this
- Throws: IOException
- thrown if unable to open the socket
- Throws: UnknownHostException
- thrown if unable to find the host
close
public void close() throws IOException
- Returns:
- Closes the socket
- Throws: IOException
- thrown if unable to open the socket
getInetAddress
public InetAddress getInetAddress()
- Returns:
- returns InetAddress that the socket is connected to
getInputStream
public InputStream getInputStream() throws IOException
- Returns:
- returns the wedge input stream, that you can read from
(that may possibly be recording)
- Throws: IOException
- thrown if unable to return the input stream
getLocalPort
public int getLocalPort()
- Returns:
- the port number that we are using
getOutputStream
public OutputStream getOutputStream() throws IOException
- Returns:
- returns the wedge output stream, that you can read from
(that may possibly be recording)
- Throws: IOException
- thrown if unable to return the input stream
getPort
public int getPort()
- Returns:
- the port number that the connection is using at the far end
setSocketImplFactory
public void setSocketImplFactory(SocketImplFactory fac) throws IOException
- Parameters:
- fac - the socket impl factory
- Throws: IOException
- thrown if unable to open the socket
toString
public String toString()
- Returns:
- returns a string representing the socket
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index