All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.TCPSessionParticipant

java.lang.Object
   |
   +----ncsa.habanero.SessionParticipant
           |
           +----ncsa.habanero.TCPSessionParticipant

public class TCPSessionParticipant
extends SessionParticipant
The TCPSessionParticipant object identifies a particular client within the collaboration when the collaboration is based on TCP, ie there is an IP address and a port number.


Constructor Index

 o TCPSessionParticipant(InetAddress, int)
The constructor takes an InetAddress.
 o TCPSessionParticipant(String, int)
The constructor takes an IP address (as a string) and constructs an InetAddress.

Method Index

 o addConnection(MarshallOutput)
A single TCPSessionParticipant could have different ports for each collobject.
 o address()
 o addressFromString(String)
 o connectFromDump(MarshallInput)
 o dumpConnectionInfo(MarshallOutput)
Dump info about how to connect to my SessionManager to out.
 o getOutput(Specifier)
Given a Collobject identifier, return an Output
 o hostName()
Just returns my IP address as a String.
 o isValidAddress()
 o key()
 o lostConnection(MarshallOutput, Session)
 o makeKeyFromUnique(String)
 o port()
Just returns my port number as a String.
 o portNum()
 o sessionManagerConnection()
 o toString()
Returns my unique identifier as my printable String.
 o unique()
Returns a string uniquely identifying me by appending my SessionManager's port number to my IP address.

Constructors

 o TCPSessionParticipant
 public TCPSessionParticipant(String hostname,
                              int port)
The constructor takes an IP address (as a string) and constructs an InetAddress. It also takes the port number of my SessionManager to use as a unique identifier.

 o TCPSessionParticipant
 public TCPSessionParticipant(InetAddress addr,
                              int port)
The constructor takes an InetAddress. It also takes the port number of my SessionManager to use as a unique identifier.

Methods

 o addressFromString
 protected InetAddress addressFromString(String choices)
 o addConnection
 public synchronized void addConnection(MarshallOutput connection)
A single TCPSessionParticipant could have different ports for each collobject. This adds a port number to my list.

 o lostConnection
 public synchronized void lostConnection(MarshallOutput connection,
                                         Session s)
Overrides:
lostConnection in class SessionParticipant
 o getOutput
 public MarshallOutput getOutput(Specifier collobjId)
Given a Collobject identifier, return an Output

Parameters:
collobjId - identifies the collobject for which we find the port
 o unique
 public String unique()
Returns a string uniquely identifying me by appending my SessionManager's port number to my IP address.

Overrides:
unique in class SessionParticipant
 o toString
 public String toString()
Returns my unique identifier as my printable String.

Overrides:
toString in class Object
 o hostName
 public String hostName()
Just returns my IP address as a String.

Overrides:
hostName in class SessionParticipant
 o port
 public String port()
Just returns my port number as a String.

Overrides:
port in class SessionParticipant
 o portNum
 public int portNum()
Overrides:
portNum in class SessionParticipant
 o sessionManagerConnection
 public DeferredIO sessionManagerConnection()
Parameters:
aSession - the session which needs the connection
Returns:
Return an output object connected to my SessionManager. Open a socket if necessary.
Overrides:
sessionManagerConnection in class SessionParticipant
 o dumpConnectionInfo
 public void dumpConnectionInfo(MarshallOutput out)
Dump info about how to connect to my SessionManager to out.

Overrides:
dumpConnectionInfo in class SessionParticipant
 o connectFromDump
 public DeferredIO connectFromDump(MarshallInput in)
Parameters:
in - the input stream
aSession - the session that is asking for this Given a SessionManager's connection info, return an IO Object connected to it. This routine has nothing to do with this particular object, but it needs to be virtual to accomodate different kinds of connection algorithms. The assumption is that all SessionParticipants will be of the same subclass.
Overrides:
connectFromDump in class SessionParticipant
 o isValidAddress
 public boolean isValidAddress()
Overrides:
isValidAddress in class SessionParticipant
 o key
 public String key()
Overrides:
key in class SessionParticipant
 o makeKeyFromUnique
 public static String makeKeyFromUnique(String unique)
 o address
 protected InetAddress address()

All Packages  Class Hierarchy  This Package  Previous  Next  Index