Class AdvertisedService
- java.lang.Object
- 
- org.eclipse.ecf.discovery.ServiceInfo
- 
- org.eclipse.ecf.provider.zookeeper.core.AdvertisedService
 
 
- 
- All Implemented Interfaces:
- Serializable,- org.eclipse.core.runtime.IAdaptable,- IServiceInfo,- org.eclipse.ecf.provider.zookeeper.core.internal.IService,- org.eclipse.ecf.provider.zookeeper.node.internal.INode
 
 public class AdvertisedService extends ServiceInfo implements org.eclipse.ecf.provider.zookeeper.node.internal.INode, org.eclipse.ecf.provider.zookeeper.core.internal.IService Encapsulate a service to be advertised and made visible for discovery. An object ofAdvertisedServiceis build either with an OSGi service referenceServiceReferenceorServiceInfoobject.- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.eclipse.ecf.discovery.ServiceInfoDEFAULT_PRIORITY, DEFAULT_TTL, DEFAULT_WEIGHT, priority, properties, serviceID, serviceName, timeToLive, UNKNOWN_PROTOCOL, weight
 - 
Fields inherited from interface org.eclipse.ecf.provider.zookeeper.node.internal.INode_BYTES_, _URI_, _ZOODISCOVERYID_, ID_POSITION, NODE_PROPERTY_NAME_NA, NODE_PROPERTY_NAME_PROTOCOLS, NODE_PROPERTY_NAME_SCOPE, NODE_PROPERTY_SERVICE_NAME, NODE_PROPERTY_SERVICES, NODE_SERVICE_PROPERTIES, ROOT, ROOT_SLASH, SLASH, STRING_DELIM, URI_POSITION, ZOODISCOVERYID_POSITION
 
- 
 - 
Constructor SummaryConstructors Constructor Description AdvertisedService(IServiceInfo serviceInfo)AdvertisedService(ServiceReference ref)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Object o)StringgetAbsolutePath()URIgetLocation()Get URI for serviceStringgetNodeId()StringgetPath()byte[]getPropertiesAsBytes()The byte representation of the service properties, appropriate to be stored in the zooKeeper nodestatic Map<String,IServiceInfo>getPublishedServices()IServiceIDgetServiceID()Get ServiceID for service.ServiceReferencegetServiceReference()org.eclipse.ecf.provider.zookeeper.core.internal.IServicegetWrappedService()booleanisLocalNode()voidregenerateNodeId()static IServiceInforemovePublished(String id)- 
Methods inherited from class org.eclipse.ecf.discovery.ServiceInfogetAdapter, getPriority, getServiceName, getServiceProperties, getTTL, getWeight, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.ecf.discovery.IServiceInfogetPriority, getServiceName, getServiceProperties, getTTL, getWeight
 
- 
 
- 
- 
- 
Constructor Detail- 
AdvertisedServicepublic AdvertisedService(ServiceReference ref) 
 - 
AdvertisedServicepublic AdvertisedService(IServiceInfo serviceInfo) 
 
- 
 - 
Method Detail- 
getPublishedServicespublic static Map<String,IServiceInfo> getPublishedServices() 
 - 
removePublishedpublic static IServiceInfo removePublished(String id) 
 - 
getNodeIdpublic String getNodeId() 
 - 
regenerateNodeIdpublic void regenerateNodeId() - Specified by:
- regenerateNodeIdin interface- org.eclipse.ecf.provider.zookeeper.node.internal.INode
 
 - 
getLocationpublic URI getLocation() Description copied from interface:IServiceInfoGet URI for service- Specified by:
- getLocationin interface- IServiceInfo
- Overrides:
- getLocationin class- ServiceInfo
- Returns:
- URIthe location for the service.
 
 - 
getServiceIDpublic IServiceID getServiceID() Description copied from interface:IServiceInfoGet ServiceID for service.- Specified by:
- getServiceIDin interface- IServiceInfo
- Overrides:
- getServiceIDin class- ServiceInfo
- Returns:
- ServiceID the serviceID for the service. Will not be
         null.
 
 - 
compareTopublic int compareTo(Object o) 
 - 
getServiceReferencepublic ServiceReference getServiceReference() - Returns:
- ServiceReference may be null if this
         AdvertisedServiceinstance is notbuiltcalling constructorAdvertisedService(ServiceReference ref).
 
 - 
getPropertiesAsBytespublic byte[] getPropertiesAsBytes() Description copied from interface:org.eclipse.ecf.provider.zookeeper.core.internal.IServiceThe byte representation of the service properties, appropriate to be stored in the zooKeeper node- Specified by:
- getPropertiesAsBytesin interface- org.eclipse.ecf.provider.zookeeper.core.internal.IService
- Returns:
- byte representation of the properties
 
 - 
getPathpublic String getPath() - Specified by:
- getPathin interface- org.eclipse.ecf.provider.zookeeper.node.internal.INode
 
 - 
getAbsolutePathpublic String getAbsolutePath() - Specified by:
- getAbsolutePathin interface- org.eclipse.ecf.provider.zookeeper.node.internal.INode
 
 - 
isLocalNodepublic boolean isLocalNode() - Specified by:
- isLocalNodein interface- org.eclipse.ecf.provider.zookeeper.node.internal.INode
 
 - 
getWrappedServicepublic org.eclipse.ecf.provider.zookeeper.core.internal.IService getWrappedService() - Specified by:
- getWrappedServicein interface- org.eclipse.ecf.provider.zookeeper.node.internal.INode
 
 
- 
 
-