Package org.xbill.DNS
Class SRVRecord
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.SRVRecord
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Record>
Server Selection Record - finds hosts running services in a domain. An SRV record will normally
be named _<service>._<protocol>.domain - examples would be _sips._tcp.example.org
(for the secure SIP protocol) and _http._tcp.example.com (if HTTP used SRV records)
- Author:
- Brian Wellington
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name for which additional data processing should be done for this record.intgetPort()Returns the port that the service runs onintReturns the priorityReturns the host running that the serviceintReturns the weightprotected voidrdataFromString(Tokenizer st, Name origin) Converts the text format of an RR to the internal format - must be overridenprotected voidrrFromWire(DNSInput in) Converts the type-specific RR to wire format - must be overriddenprotected StringConverts rdata to a Stringprotected voidrrToWire(DNSOutput out, Compression c, boolean canonical) Converts the type-specific RR to wire format - must be overridden.Methods inherited from class org.xbill.DNS.Record
byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName
-
Constructor Details
-
SRVRecord
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 usestarget- The host running the service
-
-
Method Details
-
rrFromWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden- Specified by:
rrFromWirein classRecord- Throws:
IOException
-
rdataFromString
Description copied from class:RecordConverts the text format of an RR to the internal format - must be overriden- Specified by:
rdataFromStringin classRecord- Throws:
IOException
-
rrToString
Converts rdata to a String- Specified by:
rrToStringin classRecord
-
getPriority
public int getPriority()Returns the priority -
getWeight
public int getWeight()Returns the weight -
getPort
public int getPort()Returns the port that the service runs on -
getTarget
Returns the host running that the service -
rrToWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden. -
getAdditionalName
Description copied from class:RecordReturns the name for which additional data processing should be done for this record. This can be used both for building responses and parsing responses.- Overrides:
getAdditionalNamein classRecord- Returns:
- The name to used for additional data processing, or null if this record type does not require additional data processing.
-