public class ServiceInfo extends java.lang.Object implements IServiceInfo, java.io.Serializable
IServiceInfo
. Subclasses may be created as
appropriate.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRIORITY |
static long |
DEFAULT_TTL |
static int |
DEFAULT_WEIGHT |
protected int |
priority |
protected IServiceProperties |
properties |
protected IServiceID |
serviceID |
protected java.lang.String |
serviceName |
protected long |
timeToLive |
static java.lang.String |
UNKNOWN_PROTOCOL |
protected int |
weight |
Modifier | Constructor and Description |
---|---|
protected |
ServiceInfo() |
|
ServiceInfo(java.net.URI anURI,
java.lang.String aServiceName,
IServiceTypeID aServiceTypeID)
Create an IServiceInfo instance.
|
|
ServiceInfo(java.net.URI anURI,
java.lang.String aServiceName,
IServiceTypeID aServiceTypeID,
int priority,
int weight,
IServiceProperties props)
Create an IServiceInfo instance.
|
|
ServiceInfo(java.net.URI anURI,
java.lang.String aServiceName,
IServiceTypeID aServiceTypeID,
int priority,
int weight,
IServiceProperties props,
long ttl)
Create an IServiceInfo instance.
|
|
ServiceInfo(java.net.URI anURI,
java.lang.String aServiceName,
IServiceTypeID aServiceTypeID,
IServiceProperties props)
Create an IServiceInfo instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAdapter(java.lang.Class adapter) |
java.net.URI |
getLocation()
Get URI for service
|
int |
getPriority()
The priority for the service
Priority: The priority of this target host.
|
IServiceID |
getServiceID()
Get ServiceID for service.
|
java.lang.String |
getServiceName()
(non-Javadoc)
|
IServiceProperties |
getServiceProperties()
Map with any/all properties associated with the service.
|
long |
getTTL()
(non-Javadoc)
|
int |
getWeight()
The weight for the service.
|
java.lang.String |
toString() |
public static final long DEFAULT_TTL
public static final int DEFAULT_PRIORITY
public static final int DEFAULT_WEIGHT
public static final java.lang.String UNKNOWN_PROTOCOL
protected java.lang.String serviceName
protected IServiceID serviceID
protected int priority
protected int weight
protected IServiceProperties properties
protected long timeToLive
protected ServiceInfo()
public ServiceInfo(java.net.URI anURI, java.lang.String aServiceName, IServiceTypeID aServiceTypeID)
anURI
- The (absolute) location of the service.aServiceName
- a user chosen service name. Only ASCII characters are allowed.aServiceTypeID
- the service type identifier.public ServiceInfo(java.net.URI anURI, java.lang.String aServiceName, IServiceTypeID aServiceTypeID, IServiceProperties props)
anURI
- The (absolute) location of the service.aServiceName
- a user chosen service name. Only ASCII characters are allowed.aServiceTypeID
- the service type identifier.props
- generic service properties.public ServiceInfo(java.net.URI anURI, java.lang.String aServiceName, IServiceTypeID aServiceTypeID, int priority, int weight, IServiceProperties props)
anURI
- The (absolute) location of the service.aServiceName
- a user chosen service name. Only ASCII characters are allowed.aServiceTypeID
- the service type identifier.priority
- the service priority. 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.weight
- the service weight. A server selection mechanism. 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. Domain administrators
SHOULD use Weight 0 when there isn't any server selection to
do. In the presence of records containing weights greater than
0, records with weight 0 should have a very small chance of
being selected.props
- generic service properties.public ServiceInfo(java.net.URI anURI, java.lang.String aServiceName, IServiceTypeID aServiceTypeID, int priority, int weight, IServiceProperties props, long ttl)
anURI
- The (absolute) location of the service.aServiceName
- a user chosen service name. Only ASCII characters are allowed.aServiceTypeID
- the service type identifier.priority
- the service priority. 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.weight
- the service weight. A server selection mechanism. 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. Domain administrators
SHOULD use Weight 0 when there isn't any server selection to
do. In the presence of records containing weights greater than
0, records with weight 0 should have a very small chance of
being selected.props
- generic service properties.ttl
- time to livepublic java.net.URI getLocation()
IServiceInfo
getLocation
in interface IServiceInfo
URI
the location for the service.public IServiceID getServiceID()
IServiceInfo
getServiceID
in interface IServiceInfo
null
.public int getPriority()
IServiceInfo
getPriority
in interface IServiceInfo
public int getWeight()
IServiceInfo
getWeight
in interface IServiceInfo
public IServiceProperties getServiceProperties()
IServiceInfo
getServiceProperties
in interface IServiceInfo
null
.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object getAdapter(java.lang.Class adapter)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
public java.lang.String getServiceName()
getServiceName
in interface IServiceInfo
IServiceInfo.getServiceName()
public long getTTL()
getTTL
in interface IServiceInfo
IServiceInfo.getTTL()