java.lang.Object

com.opentok.android.Connection


public final class Connection extends Object

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.

See Also: : - Session.getConnection() - Session.SessionListener.onStreamReceived(Session session, Stream stream) - Session.SessionListener.onConnected(Session session)

Method Summary

All MethodsInstance MethodsConcrete Methods

Modifier and Type

Method

Description

boolean

equals(Object object)

protected void

finalize()

String

getConnectionId()

Date

getCreationTime()

String

getData()

int

hashCode()

Methods inherited from class java.lang.Object

clone, getClass, notify, notifyAll, toString, wait, wait, wait

Method Details

getConnectionId

public String getConnectionId()

Returns: : The unique ID for this connection.

getData

public String getData()

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

getCreationTime

public Date getCreationTime()

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

finalize

protected void finalize() throws Throwable

Overrides: : finalize in class Object

Throws: : Throwable

equals

public boolean equals(@Nullable Object object)

Overrides: : equals in class Object

hashCode

public int hashCode()

Overrides: : hashCode in class Object