Package 

Class ServerReflexiveCandidate

  • All Implemented Interfaces:
    java.lang.Comparable

    
    public class ServerReflexiveCandidate
    extends LocalCandidate
                        

    ServerReflexiveCandidates are candidates 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. ServerReflexiveCandidates can be learned by STUN servers using the Binding Request, or TURN servers, which provides both a Relayed and Server Reflexive candidate.

    This class does not contain a socket itself and in order to send bytes over the network, one has to retrieve the socket of its base.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      IceSocketWrapper getCandidateIceSocketWrapper()
      void free() Frees resources allocated by this candidate such as its DatagramSocket, for example.
      • Methods inherited from class org.ice4j.ice.LocalCandidate

        getDatagramSocket, getExtendedType, getSocket, getStunSocket, getStunStack, getUfrag, isDefault, isSSL, setExtendedType, setSSL, setUfrag
      • 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

      • ServerReflexiveCandidate

        ServerReflexiveCandidate(TransportAddress address, HostCandidate base, TransportAddress stunSrvrAddr, CandidateExtendedType extendedType)
        Creates a ServerReflexiveCandidate for the specified transport address, and base.
        Parameters:
        address - the TransportAddress that this Candidateis representing.
        base - the HostCandidate that this server reflexive candidate was obtained through.
        stunSrvrAddr - the TransportAddress of the stun server that reflected 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").
      • ServerReflexiveCandidate

        ServerReflexiveCandidate(TransportAddress address, HostCandidate base, TransportAddress stunSrvrAddr, StunCandidateHarvest stunHarvest, CandidateExtendedType extendedType)
        Creates a ServerReflexiveCandidate for the specified transport address, and base.
        Parameters:
        address - the TransportAddress that this Candidateis representing.
        base - the HostCandidate that this server reflexive candidate was obtained through.
        stunSrvrAddr - the TransportAddress of the stun server that reflected this candidate.
        stunHarvest - the StunCandidateHarvest
        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").
    • Method Detail

      • free

         void free()

        Frees resources allocated by this candidate such as its DatagramSocket, for example. The socket of this LocalCandidate is closed only if it is not the socket of the base of this LocalCandidate.