Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.directory.ldap.dns
Class DNSServiceEntry

java.lang.Object
  extended by org.nuxeo.ecm.directory.ldap.dns.DNSServiceEntry
All Implemented Interfaces:
java.lang.Comparable<DNSServiceEntry>

public class DNSServiceEntry
extends java.lang.Object
implements java.lang.Comparable<DNSServiceEntry>

Encapsulates a hostname and port.


Constructor Summary
DNSServiceEntry(java.lang.String host, int port, int priority, int weight)
           
 
Method Summary
 int compareTo(DNSServiceEntry o)
           
 boolean equals(java.lang.Object o)
           
 java.lang.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()
           
 java.lang.String toString()
          Return the hostname in the form (hostname:port)
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DNSServiceEntry

public DNSServiceEntry(java.lang.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 java.lang.String getHost()
Returns the hostname.


getPort

public int getPort()
Returns the port.


toString

public java.lang.String toString()
Return the hostname in the form (hostname:port)

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

compareTo

public int compareTo(DNSServiceEntry o)
Specified by:
compareTo in interface java.lang.Comparable<DNSServiceEntry>
See Also:
Comparable.compareTo(java.lang.Object)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.