Package org.nuxeo.ecm.directory.ldap.dns
Class DNSServiceEntry
- java.lang.Object
-
- org.nuxeo.ecm.directory.ldap.dns.DNSServiceEntry
-
- All Implemented Interfaces:
Comparable<DNSServiceEntry>
public class DNSServiceEntry extends Object implements Comparable<DNSServiceEntry>
Encapsulates a hostname and port.
-
-
Constructor Summary
Constructors Constructor Description DNSServiceEntry(String host, int port, int priority, int weight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(DNSServiceEntry o)
boolean
equals(Object o)
String
getHost()
Returns the hostname.int
getPort()
Returns the port.int
getPriority()
Get the priority of this DNS entry, descending priority 0(highest)..Integer.MAX_VALUE(lowest)int
getWeight()
Get the weight of this DNS entry to compare entries with equal priority, ascending weight 0(lowest)..Integer.MAX_VALUE(highest)int
hashCode()
String
toString()
Return the hostname in the form (hostname:port)
-
-
-
Constructor Detail
-
DNSServiceEntry
public DNSServiceEntry(String host, int port, int priority, int weight)
-
-
Method Detail
-
getPriority
public int getPriority()
Get the priority of this DNS entry, descending priority 0(highest)..Integer.MAX_VALUE(lowest)
-
getWeight
public int getWeight()
Get the weight of this DNS entry to compare entries with equal priority, ascending weight 0(lowest)..Integer.MAX_VALUE(highest)
-
getHost
public String getHost()
Returns the hostname.
-
getPort
public int getPort()
Returns the port.
-
toString
public String toString()
Return the hostname in the form (hostname:port)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
compareTo
public int compareTo(DNSServiceEntry o)
- Specified by:
compareTo
in interfaceComparable<DNSServiceEntry>
- See Also:
Comparable.compareTo(java.lang.Object)
-
-