Connection

public final class Connection

Represents a connection between a client and an OpenTok session. The 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.

Methods

Name Description
equals(object) → {boolean}
finalize()
getConnectionId() → {String}
getCreationTime() → {Date}
getData() → {String}
hashCode() → {int}

equals(object) → {boolean}

Parameters:
Name Type Description
object Object
Returns:

boolean

finalize()

getConnectionId() → {String}

Returns:

The unique ID for this connection.

getCreationTime() → {Date}

Returns:

Returns the time at which the connection was created on the OpenTok server.

getData() → {String}

Returns:

A string containing metadata describing the connection. You can add this connection data when you create a token.

hashCode() → {int}

Returns:

int