Package org.eclipse.ecf.discovery
Interface IDiscoveryAdvertiser
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
- All Known Subinterfaces:
IDiscoveryContainerAdapter
,IDiscoveryService
- All Known Implementing Classes:
AbstractDiscoveryContainerAdapter
,DnsSdDiscoveryAdvertiser
,DnsSdDiscoveryContainerAdapter
,DnsSdDiscoveryLocator
,JSLPDiscoveryContainer
public interface IDiscoveryAdvertiser
extends org.eclipse.core.runtime.IAdaptable
Entry point discovery advertiser. This interface exposes the ability to
register and unregister locally provided services.
This interface can be used by container provider implementations as an adapter so that calls to IContainer.getAdapter(IDiscoveryAdvertiser.class) will return a non-null instance of a class that implements this interface. Clients can then proceed to use this interface to interact with the given discovery implementation.
- Since:
- 3.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the discovery container under which it is registered with the OSGi runtime as a service property -
Method Summary
Modifier and TypeMethodDescriptionGet a Namespace for services associated with this discovery container adapter.void
registerService
(IServiceInfo serviceInfo) Register the given service.void
Unregister all previously registered service.void
unregisterService
(IServiceInfo serviceInfo) Unregister a previously registered service defined by serviceInfo.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Field Details
-
CONTAINER_NAME
The name of the discovery container under which it is registered with the OSGi runtime as a service property- See Also:
-
-
Method Details
-
registerService
Register the given service. This publishes the service defined by the serviceInfo to the underlying publishing mechanism- Parameters:
serviceInfo
- IServiceInfo of the service to be published. Must not benull
.
-
unregisterService
Unregister a previously registered service defined by serviceInfo.- Parameters:
serviceInfo
- IServiceInfo defining the service to unregister. Must not benull
.
-
unregisterAllServices
void unregisterAllServices()Unregister all previously registered service. -
getServicesNamespace
Namespace getServicesNamespace()Get a Namespace for services associated with this discovery container adapter. The given Namespace may be used via IServiceIDFactory to create IServiceIDs rather than simple IDs. For example:IServiceID serviceID = ServiceIDFactory.getDefault().createServiceID( container.getServicesNamespace(), serviceType, serviceName);
- Returns:
- Namespace for creating service IDs. Will not be
null
.
-