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 of
AdvertisedService is build either with an OSGi service
reference ServiceReference or ServiceInfo object.- See Also:
-
Field Summary
Fields inherited from class org.eclipse.ecf.discovery.ServiceInfo
DEFAULT_PRIORITY, DEFAULT_TTL, DEFAULT_WEIGHT, priority, properties, serviceID, serviceName, timeToLive, UNKNOWN_PROTOCOL, weightFields 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_POSITIONFields inherited from interface org.eclipse.ecf.provider.zookeeper.core.internal.IService
LOCATION, PRIORITY, PROTOCOLS, SERVICE_NAME, WEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet URI for servicegetPath()byte[]The byte representation of the service properties, appropriate to be stored in the zooKeeper nodestatic Map<String,IServiceInfo> Get ServiceID for service.org.eclipse.ecf.provider.zookeeper.core.internal.IServicebooleanvoidstatic IServiceInfoMethods inherited from class org.eclipse.ecf.discovery.ServiceInfo
getAdapter, getPriority, getServiceName, getServiceProperties, getTTL, getWeight, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.ecf.discovery.IServiceInfo
getPriority, getServiceName, getServiceProperties, getTTL, getWeight
-
Constructor Details
-
AdvertisedService
-
AdvertisedService
-
-
Method Details
-
getPublishedServices
-
removePublished
-
getNodeId
-
regenerateNodeId
public void regenerateNodeId()- Specified by:
regenerateNodeIdin interfaceorg.eclipse.ecf.provider.zookeeper.node.internal.INode
-
getLocation
Description copied from interface:IServiceInfoGet URI for service- Specified by:
getLocationin interfaceIServiceInfo- Overrides:
getLocationin classServiceInfo- Returns:
URIthe location for the service.
-
getServiceID
Description copied from interface:IServiceInfoGet ServiceID for service.- Specified by:
getServiceIDin interfaceIServiceInfo- Overrides:
getServiceIDin classServiceInfo- Returns:
- ServiceID the serviceID for the service. Will not be
null.
-
compareTo
-
getServiceReference
- Returns:
- ServiceReference may be null if this
AdvertisedServiceinstance is notbuiltcalling constructorAdvertisedService(ServiceReference ref).
-
getPropertiesAsBytes
public 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 interfaceorg.eclipse.ecf.provider.zookeeper.core.internal.IService- Returns:
- byte representation of the properties
-
getPath
- Specified by:
getPathin interfaceorg.eclipse.ecf.provider.zookeeper.node.internal.INode
-
getAbsolutePath
- Specified by:
getAbsolutePathin interfaceorg.eclipse.ecf.provider.zookeeper.node.internal.INode
-
isLocalNode
public boolean isLocalNode()- Specified by:
isLocalNodein interfaceorg.eclipse.ecf.provider.zookeeper.node.internal.INode
-
getWrappedService
public org.eclipse.ecf.provider.zookeeper.core.internal.IService getWrappedService()- Specified by:
getWrappedServicein interfaceorg.eclipse.ecf.provider.zookeeper.node.internal.INode
-