org.xbill.DNS
Class SRVRecord

java.lang.Object
  |
  +--org.xbill.DNS.Record
        |
        +--org.xbill.DNS.SRVRecord

public class SRVRecord
extends Record

Server Selection Record - finds hosts running services in a domain. An SRV record will normally be named ..domain - an example would be http.tcp.example.com (if HTTP used SRV records)


Fields inherited from class org.xbill.DNS.Record
dclass, name, ttl, type, wireLength
 
Constructor Summary
SRVRecord(Name _name, short _dclass, int _ttl, int _priority, int _weight, int _port, Name _target)
          Creates an SRV Record from the given data
 
Method Summary
 short getPort()
          Returns the port that the service runs on
 short getPriority()
          Returns the priority
 Name getTarget()
          Returns the host running that the service
 short getWeight()
          Returns the weight
 String toString()
          Converts to a String
 
Methods inherited from class org.xbill.DNS.Record
equals, fromString, fromWire, getDClass, getName, getRRsetType, getTTL, getType, getWireLength, hashCode, newRecord, newRecord, newRecord, toWire, toWireCanonical, withName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SRVRecord

public SRVRecord(Name _name,
                 short _dclass,
                 int _ttl,
                 int _priority,
                 int _weight,
                 int _port,
                 Name _target)
Creates an SRV Record from the given data
Parameters:
priority - The priority of this SRV. Records with lower priority are preferred.
weight - The weight, used to select between records at the same priority.
port - The TCP/UDP port that the service uses
target - The host running the service
Method Detail

toString

public String toString()
Converts to a String
Overrides:
toString in class Record

getPriority

public short getPriority()
Returns the priority

getWeight

public short getWeight()
Returns the weight

getPort

public short getPort()
Returns the port that the service runs on

getTarget

public Name getTarget()
Returns the host running that the service