org.eclipse.ecf.discovery
Interface IDiscoveryAdvertiser

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
All Known Subinterfaces:
IDiscoveryContainerAdapter, IDiscoveryService
All Known Implementing Classes:
AbstractDiscoveryContainerAdapter, CompositeDiscoveryContainer, DnsSdDiscoveryAdvertiser, DnsSdDiscoveryContainerAdapter, DnsSdDiscoveryLocator, JMDNSDiscoveryContainer, JSLPDiscoveryContainer, SingletonDiscoveryContainer, ZooDiscoveryContainer

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
static java.lang.String CONTAINER_NAME
          The name of the discovery container under which it is registered with the OSGi runtime as a service property
 
Method Summary
 Namespace getServicesNamespace()
          Get a Namespace for services associated with this discovery container adapter.
 void registerService(IServiceInfo serviceInfo)
          Register the given service.
 void unregisterAllServices()
          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 Detail

CONTAINER_NAME

static final java.lang.String CONTAINER_NAME
The name of the discovery container under which it is registered with the OSGi runtime as a service property

See Also:
Constant Field Values
Method Detail

registerService

void registerService(IServiceInfo serviceInfo)
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 be null.

unregisterService

void unregisterService(IServiceInfo serviceInfo)
Unregister a previously registered service defined by serviceInfo.

Parameters:
serviceInfo - IServiceInfo defining the service to unregister. Must not be null.

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 .