org.lastbamboo.common.ice.candidate
Enum IceCandidateType

java.lang.Object
  extended by java.lang.Enum<IceCandidateType>
      extended by org.lastbamboo.common.ice.candidate.IceCandidateType
All Implemented Interfaces:
Serializable, Comparable<IceCandidateType>

public enum IceCandidateType
extends Enum<IceCandidateType>

Enumeration of ICE candidate types, such as host, relayed, server reflexive, or peer reflexive.


Enum Constant Summary
HOST
          Host candidates accessible on the local network.
PEER_REFLEXIVE
          Candidate discovered from exchanging STUN messages with peers.
RELAYED
          Candidates relayed through a STUN relay server.
SERVER_REFLEXIVE
          Candidates with public addresses determined using a STUN server.
 
Method Summary
 int getTypePreference()
          Accessor for the type preference used in the formula for calculating candidate priorities.
 String toSdp()
          Gets the SDP representation of this type, such as "relay", "host", "srflx" or "prflx".
static IceCandidateType toType(String sdp)
          Gets the type for the associated SDP encoding.
static IceCandidateType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IceCandidateType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HOST

public static final IceCandidateType HOST
Host candidates accessible on the local network.


RELAYED

public static final IceCandidateType RELAYED
Candidates relayed through a STUN relay server.


SERVER_REFLEXIVE

public static final IceCandidateType SERVER_REFLEXIVE
Candidates with public addresses determined using a STUN server.


PEER_REFLEXIVE

public static final IceCandidateType PEER_REFLEXIVE
Candidate discovered from exchanging STUN messages with peers.

Method Detail

values

public static IceCandidateType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IceCandidateType c : IceCandidateType.values())
    System.out.println(c);

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

valueOf

public static IceCandidateType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

getTypePreference

public int getTypePreference()
Accessor for the type preference used in the formula for calculating candidate priorities.

Returns:
The type preference for calculating candidate priorities.

toSdp

public String toSdp()
Gets the SDP representation of this type, such as "relay", "host", "srflx" or "prflx".

Returns:
The SDP representation of this type.

toType

public static IceCandidateType toType(String sdp)
Gets the type for the associated SDP encoding.

Parameters:
sdp - The SDP for the type.
Returns:
The corresponding type.


Copyright © 2013 LittleShoot. All Rights Reserved.