Package rocks.xmpp.dns
Class SrvRecord
- java.lang.Object
-
- rocks.xmpp.dns.SrvRecord
-
- All Implemented Interfaces:
Comparable<SrvRecord>
public final class SrvRecord extends Object implements Comparable<SrvRecord>
A DNS SRV resource record.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(SrvRecord o)
boolean
equals(Object o)
int
getPort()
Gets the port on this target host of this service.int
getPriority()
Gets the priority of this target host.String
getTarget()
Gets the domain name of the target host.int
getWeight()
Gets the weight of this target host.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
SrvRecord
public SrvRecord(int priority, int weight, int port, String target)
-
-
Method Detail
-
getPriority
public final int getPriority()
Gets the priority of this target host.- Returns:
- The priority of this target host.
-
getWeight
public final int getWeight()
Gets the weight of this target host. The weight field specifies a relative weight for entries with the same priority.- Returns:
- The weight of this target host.
-
getPort
public final int getPort()
Gets the port on this target host of this service.- Returns:
- The port on this target host of this service.
-
getTarget
public final String getTarget()
Gets the domain name of the target host.- Returns:
- The domain name of the target host.
-
compareTo
public final int compareTo(SrvRecord o)
- Specified by:
compareTo
in interfaceComparable<SrvRecord>
-
-