org.eclipse.ecf.provider.zookeeper.core
Class AdvertisedService

java.lang.Object
  extended by org.eclipse.ecf.discovery.ServiceInfo
      extended by org.eclipse.ecf.provider.zookeeper.core.AdvertisedService
All Implemented Interfaces:
java.io.Serializable, org.eclipse.core.runtime.IAdaptable, IServiceInfo

public class AdvertisedService
extends ServiceInfo

Encapsulate a service to be advertised and made visible for discovery. An object of AdvertisedService is build either with an OSGi service reference ServiceReference or ServiceInfo object.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.ecf.discovery.ServiceInfo
DEFAULT_PRIORITY, DEFAULT_TTL, DEFAULT_WEIGHT, priority, properties, serviceID, serviceName, timeToLive, UNKNOWN_PROTOCOL, weight
 
Constructor Summary
AdvertisedService(IServiceInfo serviceInfo)
           
AdvertisedService(org.osgi.framework.ServiceReference ref)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String getAbsolutePath()
           
 java.net.URI getLocation()
          Get URI for service
 java.lang.String getNodeId()
           
 java.lang.String getPath()
           
 byte[] getPropertiesAsBytes()
           
static java.util.Map<java.lang.String,IServiceInfo> getPublishedServices()
           
 IServiceID getServiceID()
          Get ServiceID for service.
 org.osgi.framework.ServiceReference getServiceReference()
           
 IService getWrappedService()
           
 boolean isLocalNode()
           
 void regenerateNodeId()
           
static IServiceInfo removePublished(java.lang.String id)
           
 
Methods inherited from class org.eclipse.ecf.discovery.ServiceInfo
getAdapter, getPriority, getServiceName, getServiceProperties, getTTL, getWeight, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdvertisedService

public AdvertisedService(org.osgi.framework.ServiceReference ref)

AdvertisedService

public AdvertisedService(IServiceInfo serviceInfo)
Method Detail

getPublishedServices

public static java.util.Map<java.lang.String,IServiceInfo> getPublishedServices()

removePublished

public static IServiceInfo removePublished(java.lang.String id)

getNodeId

public java.lang.String getNodeId()

regenerateNodeId

public void regenerateNodeId()

getLocation

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

Specified by:
getLocation in interface IServiceInfo
Overrides:
getLocation in class ServiceInfo
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
Overrides:
getServiceID in class ServiceInfo
Returns:
ServiceID the serviceID for the service. Will not be null.

compareTo

public int compareTo(java.lang.Object o)

getServiceReference

public org.osgi.framework.ServiceReference getServiceReference()
Returns:
ServiceReference may be null if this AdvertisedService instance is not built calling constructor AdvertisedService(ServiceReference ref).

getPropertiesAsBytes

public byte[] getPropertiesAsBytes()

getPath

public java.lang.String getPath()

getAbsolutePath

public java.lang.String getAbsolutePath()

isLocalNode

public boolean isLocalNode()

getWrappedService

public IService getWrappedService()