Smack

org.jivesoftware.smack.util.dns
Class SRVRecord

java.lang.Object
  extended by org.jivesoftware.smack.util.dns.HostAddress
      extended by org.jivesoftware.smack.util.dns.SRVRecord
All Implemented Interfaces:
Comparable<SRVRecord>

public class SRVRecord
extends HostAddress
implements Comparable<SRVRecord>

Author:
Florian Schmaus
See Also:
Constructor Summary
SRVRecord(String fqdn, int port, int priority, int weight)
          Create a new SRVRecord
 
Method Summary
 int compareTo(SRVRecord other)
           
 int getPriority()
           
 int getWeight()
           
 String toString()
           
 
Methods inherited from class org.jivesoftware.smack.util.dns.HostAddress
equals, getErrorMessage, getFQDN, getPort, hashCode, setException
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SRVRecord

public SRVRecord(String fqdn,
                 int port,
                 int priority,
                 int weight)
Create a new SRVRecord

Parameters:
fqdn - Fully qualified domain name
port - The connection port
priority - Priority of the target host
weight - Relative weight for records with same priority
Throws:
IllegalArgumentException - fqdn is null or any other field is not in valid range (0-65535).
Method Detail

getPriority

public int getPriority()

getWeight

public int getWeight()

compareTo

public int compareTo(SRVRecord other)
Specified by:
compareTo in interface Comparable<SRVRecord>

toString

public String toString()
Overrides:
toString in class HostAddress

Smack

Copyright © 2003-2007 Jive Software.