public enum MediaDirection extends java.lang.Enum<MediaDirection>
Enum Constant and Description |
---|
INACTIVE
Indicates that the related entity does not support neither input
nor output (i.e.
|
RECVONLY
Represents a direction pointing to the entity that this object pertains
to and from the outside.
|
SENDONLY
Represents a direction from the entity that this direction pertains to
to the outside.
|
SENDRECV
Indicates that the related entity supports both input and output (send
and receive) operations.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsReceiving()
Determines whether the directions specified by this
MediaDirection instance allow for incoming (i.e.
|
boolean |
allowsSending()
Determines whether the directions specified by this
MediaDirection instance allow for outgoing (i.e.
|
MediaDirection |
and(MediaDirection direction)
Applies an extra direction constraint to this MediaDirection
or in other words performs an and operation.
|
MediaDirection |
getDirectionForAnswer(MediaDirection remotePartyDir)
Returns the MediaDirection value corresponding to a remote
party's perspective of this MediaDirection applying a remote
party constraint.
|
MediaDirection |
getReverseDirection()
Returns the MediaDirection value corresponding to a remote
party's perspective of this MediaDirection.
|
MediaDirection |
or(MediaDirection direction)
Reverses a direction constraint on this MediaDirection
or in other words performs an or operation.
|
static MediaDirection |
parseString(java.lang.String mediaDirectionStr)
Returns a MediaDirection value corresponding to the specified
mediaDirectionStr or in other words SENDONLY for
"sendonly", RECVONLY for "recvonly", SENDRECV for
"sendrecv", and INACTIVE for "inactive".
|
java.lang.String |
toString()
Returns the name of this MediaDirection (e.g.
|
static MediaDirection |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MediaDirection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MediaDirection INACTIVE
public static final MediaDirection SENDONLY
public static final MediaDirection RECVONLY
public static final MediaDirection SENDRECV
public static MediaDirection[] values()
for (MediaDirection c : MediaDirection.values()) System.out.println(c);
public static MediaDirection valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<MediaDirection>
public MediaDirection and(MediaDirection direction)
direction
- that direction constraint that we'd like to apply to
this MediaDirectionpublic MediaDirection or(MediaDirection direction)
direction
- the direction that we'd like to enable (i.e. add) to
this MediaDirectionpublic MediaDirection getReverseDirection()
public MediaDirection getDirectionForAnswer(MediaDirection remotePartyDir)
remotePartyDir
- the remote party MediaDirection constraint
that we'd have to consider when trying to obtain a
MediaDirection corresponding to remoteParty's constraint.public boolean allowsSending()
public boolean allowsReceiving()
public static MediaDirection parseString(java.lang.String mediaDirectionStr) throws java.lang.IllegalArgumentException
mediaDirectionStr
- the direction String that we'd like to
parse.java.lang.IllegalArgumentException
- in case mediaDirectionStr is
not a valid media direction.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.