public class ServiceRecord extends Object
Constructor and Description |
---|
ServiceRecord(String fullPath,
int priority,
int weight,
int port,
String target)
Constructs an SRV (service) record.
|
Modifier and Type | Method and Description |
---|---|
String |
name()
Returns the name for the server being queried.
|
int |
port()
Returns the port the service is running on.
|
int |
priority()
Returns the priority for this service record.
|
String |
protocol()
Returns the protocol for the service being queried (i.e.
|
String |
service()
Returns the service's name (i.e.
|
String |
target()
Returns the name of the host for the service.
|
int |
weight()
Returns the weight of this service record.
|
public ServiceRecord(String fullPath, int priority, int weight, int port, String target)
fullPath
- the name first read in the SRV record which contains the
service, the protocol, and the name of the server being
queried. The format is _service._protocol.hostname
, or
for example _http._tcp.example.com
priority
- relative priority of this service, range 0-65535 (lower is
higher priority)weight
- determines how often multiple services will be used in the
event they have the same priority (greater weight means
service is used more often)port
- the port for the servicetarget
- the name of the host for the servicepublic int priority()
public int weight()
public int port()
public String name()
public String protocol()
public String service()
public String target()
Copyright © 2015. All Rights Reserved.