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.


Variable Index

 o socket

Constructor Index

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

Method Index

 o close()
 o getInetAddress()
 o getInputStream()
 o getLocalPort()
 o getOutputStream()
 o getPort()
 o setSocketImplFactory(SocketImplFactory)
 o toString()

Variables

 o socket
 protected Socket socket

Constructors

 o 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
 o 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
 o 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
 o 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
 o 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

Methods

 o close
 public void close() throws IOException
Returns:
Closes the socket
Throws: IOException
thrown if unable to open the socket
 o getInetAddress
 public InetAddress getInetAddress()
Returns:
returns InetAddress that the socket is connected to
 o 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
 o getLocalPort
 public int getLocalPort()
Returns:
the port number that we are using
 o 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
 o getPort
 public int getPort()
Returns:
the port number that the connection is using at the far end
 o setSocketImplFactory
 public void setSocketImplFactory(SocketImplFactory fac) throws IOException
Parameters:
fac - the socket impl factory
Throws: IOException
thrown if unable to open the socket
 o 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