Class ICECandidate

    • Constructor Detail

      • ICECandidate

        public ICECandidate​(String ip,
                            int generation,
                            int network,
                            String password,
                            int port,
                            String username,
                            int preference,
                            ICECandidate.Type type)
        Constructor with the basic elements of a transport definition.
        Parameters:
        ip - the IP address to use as a local address
        generation - used to keep track of the candidates
        network - used for diagnostics (used when the machine has several NICs)
        password - user name, as it is used in ICE
        port - the port at the candidate IP address
        username - user name, as it is used in ICE
        preference - preference for this transportElement, as it is used in ICE
        type - type as defined in ICE-12
    • Method Detail

      • getId

        public String getId()
        Get the ID.
        Returns:
        the id
      • setId

        public void setId​(String id)
        Set the ID.
        Parameters:
        id - the id to set
      • getNetwork

        public int getNetwork()
        Get the network interface used for this connection.
        Returns:
        the interface number
      • setNetwork

        public void setNetwork​(int network)
        Set the interface for this connection.
        Parameters:
        network - the interface number
      • getUsername

        public String getUsername()
        Get the username for this transportElement in ICE.
        Returns:
        a username string
      • setUsername

        public void setUsername​(String username)
        Set the username for this transportElement in ICE.
        Parameters:
        username - the username used in ICE
      • getPreference

        public int getPreference()
        Get the preference number for this transportElement.
        Returns:
        the preference for this transportElement
      • setPreference

        public void setPreference​(int preference)
        Set the preference order for this transportElement.
        Parameters:
        preference - a number identifying the preference (as defined in ICE)
      • check

        public void check​(List<TransportCandidate> localCandidates)
        Check if a transport candidate is usable. The transport resolver should check if the transport candidate the other endpoint has provided is usable. ICE Candidate can check connectivity using UDP echo Test.
        Overrides:
        check in class TransportCandidate
        Parameters:
        localCandidates - a list of local candidates.
      • compareTo

        public int compareTo​(ICECandidate arg)
        Compare the to other Transport candidate.
        Specified by:
        compareTo in interface Comparable<ICECandidate>
        Parameters:
        arg - another Transport candidate
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object