org.eclipse.ecf.provider.discovery
Class CompositeDiscoveryContainer.CompositeServiceInfoWrapper

java.lang.Object
  extended by org.eclipse.ecf.provider.discovery.CompositeDiscoveryContainer.CompositeServiceInfoWrapper
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IServiceInfo
Enclosing class:
CompositeDiscoveryContainer

public static class CompositeDiscoveryContainer.CompositeServiceInfoWrapper
extends java.lang.Object
implements IServiceInfo


Constructor Summary
CompositeDiscoveryContainer.CompositeServiceInfoWrapper(IServiceInfo anInfo, ID anId)
           
 
Method Summary
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 ID getId()
           
 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()
          A user choose label used for pretty printing this service.
 IServiceProperties getServiceProperties()
          Map with any/all properties associated with the service.
 long getTTL()
          The time to live for the service.
 int getWeight()
          The weight for the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeDiscoveryContainer.CompositeServiceInfoWrapper

public CompositeDiscoveryContainer.CompositeServiceInfoWrapper(IServiceInfo anInfo,
                                                               ID anId)
Method Detail

getId

public ID getId()

getLocation

public java.net.URI getLocation()
Description copied from interface: IServiceInfo
Get URI for service

Specified by:
getLocation in interface IServiceInfo
Returns:
URI the location for the service.

getServiceID

public IServiceID getServiceID()
Description copied from interface: IServiceInfo
Get ServiceID for service.

Specified by:
getServiceID in interface IServiceInfo
Returns:
ServiceID the serviceID for the service. Will not be null.

getPriority

public int getPriority()
Description copied from interface: IServiceInfo
The priority for 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.

Specified by:
getPriority in interface IServiceInfo
Returns:
int the priority. 0 if no priority information for service.

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable

getWeight

public int getWeight()
Description copied from interface: IServiceInfo
The weight for the service. 0 if no weight information for 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.

Specified by:
getWeight in interface IServiceInfo
Returns:
int the weight

getTTL

public long getTTL()
Description copied from interface: IServiceInfo
The time to live for the service. -1 if no TTL given for service. TTL: A time to live (TTL) defining the live time of a service.

Specified by:
getTTL in interface IServiceInfo
Returns:
long the time to live in seconds

getServiceProperties

public IServiceProperties getServiceProperties()
Description copied from interface: IServiceInfo
Map with any/all properties associated with the service. Properties are assumed to be name/value pairs, both of type String.

Specified by:
getServiceProperties in interface IServiceInfo
Returns:
Map the properties associated with this service. Will not be null.

getServiceName

public java.lang.String getServiceName()
Description copied from interface: IServiceInfo
A user choose label used for pretty printing this service.

Specified by:
getServiceName in interface IServiceInfo
Returns:
A human readable service name. Not used for uniqueness!