public final class Connection extends java.lang.Object implements java.lang.Comparable<Connection>
Session.getConnection()
method returns a Connection object that represents the local user's connection.
The Stream.getConnection()
method returns a Connection object that represents
the stream publisher's connection.
To initialize a session, call the Session() constructor, which returns the Session object.
Then call the connect() method of the Session object to connect to the session. When the connection
to the session is made, the Session.SessionListener.onConnected(Session session)
method is called.
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Connection rhs) |
boolean |
equals(java.lang.Object rhs) |
protected void |
finalize() |
java.lang.String |
getConnectionId()
The unique ID for this connection.
|
java.util.Date |
getCreationTime()
Returns the time at which the connection was created on the OpenTok server.
|
java.lang.String |
getData()
A string containing metadata describing the connection.
|
int |
hashCode() |
public java.lang.String getConnectionId()
public java.lang.String getData()
public java.util.Date getCreationTime()
public boolean equals(java.lang.Object rhs)
equals
in class java.lang.Object
public int compareTo(Connection rhs)
compareTo
in interface java.lang.Comparable<Connection>
public int hashCode()
hashCode
in class java.lang.Object
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable