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.
-
TCPSessionParticipant(InetAddress, int)
- The constructor takes an InetAddress.
-
TCPSessionParticipant(String, int)
- The constructor takes an IP address (as a string)
and constructs an InetAddress.
-
addConnection(MarshallOutput)
- A single TCPSessionParticipant could have different ports
for each collobject.
-
address()
-
-
addressFromString(String)
-
-
connectFromDump(MarshallInput)
-
-
dumpConnectionInfo(MarshallOutput)
- Dump info about how to connect to my SessionManager to out.
-
getOutput(Specifier)
- Given a Collobject identifier, return an Output
-
hostName()
- Just returns my IP address as a String.
-
isValidAddress()
-
-
key()
-
-
lostConnection(MarshallOutput, Session)
-
-
makeKeyFromUnique(String)
-
-
port()
- Just returns my port number as a String.
-
portNum()
-
-
sessionManagerConnection()
-
-
toString()
- Returns my unique identifier as my printable String.
-
unique()
- Returns a string uniquely identifying me by appending my SessionManager's
port number to my IP address.
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.
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.
addressFromString
protected InetAddress addressFromString(String choices)
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.
lostConnection
public synchronized void lostConnection(MarshallOutput connection,
Session s)
- Overrides:
- lostConnection in class SessionParticipant
getOutput
public MarshallOutput getOutput(Specifier collobjId)
- Given a Collobject identifier, return an Output
- Parameters:
- collobjId - identifies the collobject for which we find the port
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
toString
public String toString()
- Returns my unique identifier as my printable String.
- Overrides:
- toString in class Object
hostName
public String hostName()
- Just returns my IP address as a String.
- Overrides:
- hostName in class SessionParticipant
port
public String port()
- Just returns my port number as a String.
- Overrides:
- port in class SessionParticipant
portNum
public int portNum()
- Overrides:
- portNum in class SessionParticipant
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
dumpConnectionInfo
public void dumpConnectionInfo(MarshallOutput out)
- Dump info about how to connect to my SessionManager to out.
- Overrides:
- dumpConnectionInfo in class SessionParticipant
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
isValidAddress
public boolean isValidAddress()
- Overrides:
- isValidAddress in class SessionParticipant
key
public String key()
- Overrides:
- key in class SessionParticipant
makeKeyFromUnique
public static String makeKeyFromUnique(String unique)
address
protected InetAddress address()
All Packages Class Hierarchy This Package Previous Next Index