Package 

Class LocalCandidate

  • 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      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").
      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").
      String getUfrag() Get the local ufrag.
      void setUfrag(String ufrag) Set the local ufrag.
      boolean isSSL() Gets the value of the 'ssl' flag.
      DatagramSocket getDatagramSocket() Gets the DatagramSocket associated with this Candidate.
      Socket getSocket() Gets the Socket associated with this Candidate.
      IceSocketWrapper getStunSocket(TransportAddress serverAddress) Creates if necessary and returns a DatagramSocket that would capture all STUN packets arriving on this candidate's socket.
      StunStack getStunStack() Gets the StunStack associated with this Candidate.
      boolean isDefault() Determines whether this Candidate is the default one for its parent component.
      void setSSL(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").
      • setUfrag

         void setUfrag(String ufrag)

        Set the local ufrag.

        Parameters:
        ufrag - local ufrag
      • isSSL

         boolean isSSL()

        Gets the value of the 'ssl' flag.

      • 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.
      • 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.