public enum CandidateType extends Enum<CandidateType>
Enum Constant and Description |
---|
HOST_CANDIDATE
A candidate obtained by binding to a specific port
from an interface on the host.
|
LOCAL_CANDIDATE
A candidate obtained by binding to a specific port
from an interface on the host.
|
PEER_REFLEXIVE_CANDIDATE
Peer Reflexive Candidate: A candidate whose IP address and port are
a binding allocated by a NAT for an agent when it sent a STUN
Binding Request through the NAT to its peer.
|
RELAYED_CANDIDATE
A Relayed Candidate is a candidate obtained by sending a TURN Allocate
request from a host candidate to a TURN server.
|
SERVER_REFLEXIVE_CANDIDATE
A Server Reflexive Candidate is a candidate whose IP address and port
are a binding allocated by a NAT for an agent when it sent a
packet through the NAT to a server.
|
STUN_CANDIDATE
A Server Reflexive Candidate is a candidate whose IP address and port
are a binding allocated by a NAT for an agent when it sent a
packet through the NAT to a server.
|
Modifier and Type | Field and Description |
---|---|
private String |
typeName
The name of this CandidateType instance.
|
Modifier and Type | Method and Description |
---|---|
static CandidateType |
parse(String candidateTypeName)
Returns a CandidateType instance corresponding to the specified
candidateTypeName.
|
String |
toString()
Returns the name of this CandidateType (e.g.
|
static CandidateType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CandidateType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CandidateType PEER_REFLEXIVE_CANDIDATE
public static final CandidateType SERVER_REFLEXIVE_CANDIDATE
public static final CandidateType RELAYED_CANDIDATE
public static final CandidateType HOST_CANDIDATE
public static final CandidateType LOCAL_CANDIDATE
public static final CandidateType STUN_CANDIDATE
private final String typeName
public static CandidateType[] values()
for (CandidateType c : CandidateType.values()) System.out.println(c);
public static CandidateType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String toString()
toString
in class Enum<CandidateType>
public static CandidateType parse(String candidateTypeName) throws IllegalArgumentException
HOST_CANDIDATE
.candidateTypeName
- the name that we'd like to parse.IllegalArgumentException
- in case candidateTypeName is
not a valid or currently supported candidate type.Copyright © 2018. All rights reserved.