-
- All Implemented Interfaces:
-
java.lang.Comparable
public abstract class LocalCandidate extends Candidate<LocalCandidate>
LocalCandidates are obtained by an agent for every stream component and are then included in outgoing offers or answers.
-
-
Field Summary
Fields Modifier and Type Field Description private CandidateExtendedTypeextendedTypeprivate Stringufragprivate booleanisSSL
-
Constructor Summary
Constructors Constructor Description LocalCandidate(TransportAddress transportAddress, Component parentComponent, CandidateType type, CandidateExtendedType extendedType, LocalCandidate relatedCandidate)Creates a LocalCandidate instance for the specified transport address and properties.
-
Method Summary
Modifier and Type Method Description CandidateExtendedTypegetExtendedType()Returns the type of method used to discover this candidate ("host", "upnp", "stun peer reflexive", "stun server reflexive", "turn relayed", "google turn relayed", "google tcp turn relayed" or "jingle node"). voidsetExtendedType(CandidateExtendedType extendedType)Sets the type of method used to discover this candidate ("host", "upnp", "stun peer reflexive", "stun server reflexive", "turn relayed", "google turn relayed", "google tcp turn relayed" or "jingle node"). StringgetUfrag()Get the local ufrag. voidsetUfrag(String ufrag)Set the local ufrag. booleanisSSL()Gets the value of the 'ssl' flag. DatagramSocketgetDatagramSocket()Gets the DatagramSocket associated with this Candidate. SocketgetSocket()Gets the Socket associated with this Candidate. IceSocketWrappergetStunSocket(TransportAddress serverAddress)Creates if necessary and returns a DatagramSocket that would capture all STUN packets arriving on this candidate's socket. StunStackgetStunStack()Gets the StunStack associated with this Candidate. booleanisDefault()Determines whether this Candidate is the default one for its parent component. voidsetSSL(boolean isSSL)Sets the value of the 'ssl' flag. -
Methods inherited from class org.ice4j.ice.Candidate
canReach, compareTo, computeGTalkPriority, computeGTalkPriorityForType, computePriority, computePriorityForType, equals, getBase, getFoundation, getHostAddress, getMappedAddress, getParentComponent, getPriority, getReflexiveAddress, getRelatedAddress, getRelatedCandidate, getRelayServerAddress, getRelayedAddress, getStunServerAddress, getTcpType, getTransport, getTransportAddress, getType, hashCode, isVirtual, setBase, setCandidateType, setFoundation, setTcpType, setVirtual, toShortString, toString -
Methods inherited from class java.lang.Comparable
compareTo -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LocalCandidate
LocalCandidate(TransportAddress transportAddress, Component parentComponent, CandidateType type, CandidateExtendedType extendedType, LocalCandidate relatedCandidate)
Creates a LocalCandidate instance for the specified transport address and properties.- Parameters:
transportAddress- the transport address that this candidate is encapsulating.parentComponent- the Component that this candidate belongs to.type- the CandidateType for this Candidate.extendedType- The type of method used to discover this candidate ("host", "upnp", "stun peer reflexive", "stun server reflexive", "turn relayed", "google turn relayed", "google tcp turn relayed" or "jingle node").relatedCandidate- the relatedCandidate: null for a host candidate, the base address (host candidate) for a reflexive candidate, the mapped address (the mapped address of the TURN allocate response) for a relayed candidate.
-
-
Method Detail
-
getExtendedType
CandidateExtendedType getExtendedType()
Returns the type of method used to discover this candidate ("host", "upnp", "stun peer reflexive", "stun server reflexive", "turn relayed", "google turn relayed", "google tcp turn relayed" or "jingle node").
-
setExtendedType
void setExtendedType(CandidateExtendedType extendedType)
Sets the type of method used to discover this candidate ("host", "upnp", "stun peer reflexive", "stun server reflexive", "turn relayed", "google turn relayed", "google tcp turn relayed" or "jingle node").
- Parameters:
extendedType- The type of method used to discover this candidate ("host", "upnp", "stun peer reflexive", "stun server reflexive", "turn relayed", "google turn relayed", "google tcp turn relayed" or "jingle node").
-
isSSL
boolean isSSL()
Gets the value of the 'ssl' flag.
-
getDatagramSocket
@Deprecated() DatagramSocket getDatagramSocket()
Gets the DatagramSocket associated with this Candidate.
-
getSocket
@Deprecated() Socket getSocket()
Gets the Socket associated with this Candidate.
-
getStunSocket
IceSocketWrapper getStunSocket(TransportAddress serverAddress)
Creates if necessary and returns a DatagramSocket that would capture all STUN packets arriving on this candidate's socket. If the serverAddress parameter is not null this socket would only intercept packets originating at this address.
- Parameters:
serverAddress- the address of the source we'd like to receive packets from or null if we'd like to intercept all STUN packets.
-
getStunStack
StunStack getStunStack()
Gets the StunStack associated with this Candidate.
-
isDefault
boolean isDefault()
Determines whether this Candidate is the default one for its parent component.
-
setSSL
void setSSL(boolean isSSL)
Sets the value of the 'ssl' flag.
- Parameters:
isSSL- the value to set.
-
-
-
-