Class SRVData

  • All Implemented Interfaces:
    Map<String,​Object>

    public class SRVData
    extends com.google.common.collect.ForwardingMap<String,​Object>
    Corresponds to the binary representation of the SRV (Service) RData

    Example

     SRVData rdata = SRVData.builder()
                            .priority(0)
                            .weight(1)
                            .port(80)
                            .target("www.foo.com.").build()
     
    See Also:
    RFC 2782
    • Method Detail

      • getPriority

        public int getPriority()
        The priority of this target host. A client MUST attempt to contact the target host with the lowest-numbered priority it can reach; target hosts with the same priority SHOULD be tried in an order defined by the weight field.
      • getWeight

        public int getWeight()
        The weight field specifies a relative weight for entries with the same priority. Larger weights SHOULD be given a proportionately higher probability of being selected.
      • getPort

        public int getPort()
        The port on this target host of this service.
      • getTarget

        public String getTarget()
        The domain name of the target host. There MUST be one or more address records for this name, the name MUST NOT be an alias.
      • delegate

        protected Map<String,​Object> delegate()
        Specified by:
        delegate in class com.google.common.collect.ForwardingMap<String,​Object>