java.lang.Object

java.lang.Enum<Role>

com.opentok.Role

All Implemented Interfaces: : Serializable, Comparable<Role>, Constable


public enum Role extends Enum<Role>

Defines values for the role parameter of the TokenOptions.Builder.role(Role role) method.

Nested Class Summary

Nested classes/interfaces inherited from class java.lang.Enum

Enum.EnumDesc<E extends Enum<E>>

Enum Constant Summary

Enum Constants

Enum Constant

Description

MODERATOR

In addition to the privileges granted to a publisher, a moderator can perform moderation functions, such as forcing clients to disconnect, to stop publishing streams, or to mute audio in published streams.

PUBLISHER

A publisher can publish streams, subscribe to streams, and signal.

PUBLISHER_ONLY

Publish only privilege.

SUBSCRIBER

A subscriber can only subscribe to streams.

Method Summary

All MethodsStatic MethodsInstance MethodsConcrete Methods

Modifier and Type

Method

Description

String

toString()

static Role

valueOf(String name)

Returns the enum constant of this class with the specified name.

static Role[]

values()

Returns an array containing the constants of this enum class, in the order they are declared.

Methods inherited from class java.lang.Enum

compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf

Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait

Enum Constant Details

SUBSCRIBER

public static final Role SUBSCRIBER

A subscriber can only subscribe to streams.

PUBLISHER

public static final Role PUBLISHER

A publisher can publish streams, subscribe to streams, and signal. (This is the default value if you do not set a role by calling the TokenOptions.Builder.role(Role role) method.

MODERATOR

public static final Role MODERATOR

In addition to the privileges granted to a publisher, a moderator can perform moderation functions, such as forcing clients to disconnect, to stop publishing streams, or to mute audio in published streams. See the Moderation developer guide.

PUBLISHER_ONLY

public static final Role PUBLISHER_ONLY

Publish only privilege.

Method Details

values

public static Role[] values()

Returns an array containing the constants of this enum class, in the order they are declared.

Returns: : an array containing the constants of this enum class, in the order they are declared

valueOf

public static Role valueOf(String name)

Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters: : name - the name of the enum constant to be returned.

Returns: : the enum constant with the specified name

Throws: : IllegalArgumentException - if this enum class has no constant with the specified name : NullPointerException - if the argument is null

toString

public String toString()

Overrides: : toString in class Enum<Role>