public 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 | Field and Description |
---|---|
protected java.lang.String |
connectionId |
protected java.util.Date |
creationTime |
protected java.lang.String |
data |
Modifier | Constructor and Description |
---|---|
protected |
Connection(java.lang.String connectionId,
long creationTime,
java.lang.String data) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Connection another) |
boolean |
equals(java.lang.Object obj) |
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() |
protected java.lang.String connectionId
protected java.util.Date creationTime
protected java.lang.String data
protected Connection(java.lang.String connectionId, long creationTime, java.lang.String data)
public java.lang.String getConnectionId()
public java.lang.String getData()
public java.util.Date getCreationTime()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(Connection another)
compareTo
in interface java.lang.Comparable<Connection>
public int hashCode()
hashCode
in class java.lang.Object