Package com.opentok

Class Session

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String generateToken()
      Generates the token for the session.
      java.lang.String generateToken​(TokenOptions tokenOptions)
      Creates a token for connecting to an OpenTok session.
      int getApiKey()
      Returns the OpenTok API key used to generate the session.
      SessionProperties getProperties()
      Returns the properties defining the session.
      java.lang.String getSessionId()
      Returns the session ID, which uniquely identifies the session.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getApiKey

        public int getApiKey()
        Returns the OpenTok API key used to generate the session.
      • getSessionId

        public java.lang.String getSessionId()
        Returns the session ID, which uniquely identifies the session.
      • getProperties

        public SessionProperties getProperties()
        Returns the properties defining the session. These properties include:
        • The location hint IP address.
        • Whether the session's streams will be transmitted directly between peers or using the OpenTok media server.
      • generateToken

        public java.lang.String generateToken​(TokenOptions tokenOptions)
                                       throws OpenTokException
        Creates a token for connecting to an OpenTok session. In order to authenticate a user connecting to an OpenTok session that user must pass an authentication token along with the API key.
        Parameters:
        tokenOptions - This TokenOptions object defines options for the token. These include the following:
        • The role of the token (subscriber, publisher, or moderator)
        • The expiration time of the token
        • Connection data describing the end-user
        Returns:
        The token string.
        Throws:
        OpenTokException