public interface IDiscoveryLocator
extends org.eclipse.core.runtime.IAdaptable
This interface can be used by container provider implementations as an adapter so that calls to IContainer.getAdapter(IDiscoveryLocator.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.
Modifier and Type | Field and Description |
---|---|
static String |
CONTAINER_NAME
The name of the discovery container under which it is registered with the
OSGi runtime as a service property
|
Modifier and Type | Method and Description |
---|---|
void |
addServiceListener(IServiceListener listener)
Add a service listener.
|
void |
addServiceListener(IServiceTypeID type,
IServiceListener listener)
Add a service listener.
|
void |
addServiceTypeListener(IServiceTypeListener listener)
Add a service type listener.
|
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServiceInfo(IServiceID aServiceID)
Asynchronously retrieve info about the service
|
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServices()
Asynchronously get service info about all known services
|
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServices(IServiceTypeID aServiceTypeID)
Asynchronously get service info about all known services of given service
type
|
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServiceTypes()
Asynchronously get service info about all known services of given service
type
|
IServiceInfo |
getServiceInfo(IServiceID aServiceID)
Synchronously retrieve info about the service
|
IServiceInfo[] |
getServices()
Synchronously get service info about all known services
|
IServiceInfo[] |
getServices(IServiceTypeID aServiceTypeID)
Synchronously get service info about all known services of given service
type
|
Namespace |
getServicesNamespace()
Get a Namespace for services associated with this discovery container
adapter.
|
IServiceTypeID[] |
getServiceTypes()
Synchronously get service info about all known services of given service
type
|
IServiceInfo[] |
purgeCache()
Purges the underlying IServiceInfo cache if available in the current
provider
|
void |
removeServiceListener(IServiceListener listener)
Remove a service listener.
|
void |
removeServiceListener(IServiceTypeID type,
IServiceListener listener)
Remove a service listener.
|
void |
removeServiceTypeListener(IServiceTypeListener listener)
Remove a service type listener.
|
static final String CONTAINER_NAME
IServiceInfo getServiceInfo(IServiceID aServiceID)
aServiceID
- IServiceID of the service to get info about. Must not be
null
.null
if no
information retrievable.IServiceInfo[] getServices()
null
. May be of length 0.IServiceInfo[] getServices(IServiceTypeID aServiceTypeID)
aServiceTypeID
- IServiceTypeID defining the type of service we are interested
in getting service info about. Must not be null
null
. May be of length 0.IServiceTypeID[] getServiceTypes()
null
. May be of length 0.Namespace getServicesNamespace()
IServiceID serviceID = ServiceIDFactory.getDefault().createServiceID(container.getServicesNamespace(), serviceType, serviceName);
null
.IServiceInfo[] purgeCache()
void addServiceListener(IServiceListener listener)
listener
- IServiceListener to be notified. Must not be null
.void addServiceListener(IServiceTypeID type, IServiceListener listener)
type
- String type to listen for. Must not be null
. Must
be formatted according to this specific IDiscoveryContainerlistener
- IServiceListener to be notified. Must not be null
.void addServiceTypeListener(IServiceTypeListener listener)
listener
- the listener to be notified. Must not be null
.void removeServiceListener(IServiceListener listener)
listener
- IServiceListener listener to be removed. Must not be
null
.void removeServiceListener(IServiceTypeID type, IServiceListener listener)
type
- String of the desired type to remove the listener. Must not be
null
. Must be formatted according to this
specific IDiscoveryContainerlistener
- IServiceListener listener to be removed. Must not be
null
.void removeServiceTypeListener(IServiceTypeListener listener)
listener
- IServiceTypeListener to be removed. Must not be
null
.org.eclipse.equinox.concurrent.future.IFuture getAsyncServiceInfo(IServiceID aServiceID)
aServiceID
- IServiceID of the service to get info about. Must not be
null
.null
if no information retrievable.org.eclipse.equinox.concurrent.future.IFuture getAsyncServices()
null
. May be of length
0.org.eclipse.equinox.concurrent.future.IFuture getAsyncServices(IServiceTypeID aServiceTypeID)
aServiceTypeID
- IServiceTypeID defining the type of service we are interested
in getting service info about. Must not be null
null
. May be of length
0.org.eclipse.equinox.concurrent.future.IFuture getAsyncServiceTypes()
null
. May be of length
0.Copyright © 2017 Eclipse Foundation. All rights reserved.