Class DNSRecordSRV

    • Constructor Detail

      • DNSRecordSRV

        public DNSRecordSRV​(int priority,
                            int weight,
                            int port,
                            String serverName)
                     throws IllegalArgumentException
        Constructs a DNSRecordSRV.
        Parameters:
        priority - is lowest
        weight - 1 at minimum
        port - the port of service
        serverName - the host
        Throws:
        IllegalArgumentException - if priority < 0 or weight <= 1
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getPriority

        public int getPriority()
        Returns the priority of DNS SRV record.
        Returns:
        a positive priority, where lowest values have to be considered first.
      • getWeight

        public int getWeight()
        Returns the weight of DNS record from 0 to 65535.
        Returns:
        The weight, higher value means higher probability of selecting the given record for a given priority.
      • getPort

        public int getPort()
        Returns the IP port of record.
        Returns:
        a value from 1 to 65535.
      • getServerName

        public String getServerName()
        Returns the DNS server name.
        Returns:
        a not null server name.