|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.provider.discovery.SingletonDiscoveryContainer
public class SingletonDiscoveryContainer
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryLocator |
|---|
CONTAINER_NAME |
| Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser |
|---|
CONTAINER_NAME |
| Constructor Summary | |
|---|---|
SingletonDiscoveryContainer(IContainer container)
|
|
| Method Summary | |
|---|---|
void |
addListener(IContainerListener listener)
Add listener to IContainer. |
void |
addServiceListener(IServiceListener listener)
|
void |
addServiceListener(IServiceTypeID type,
IServiceListener listener)
|
void |
addServiceTypeListener(IServiceTypeListener listener)
|
void |
connect(ID targetID,
IConnectContext connectContext)
Connect to a target remote process or process group. |
void |
disconnect()
Disconnect. |
void |
dispose()
Dispose this IContainer instance. |
java.lang.Object |
getAdapter(java.lang.Class adapter)
This specialization of IAdaptable.getAdapter() returns additional services supported by this container. |
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServiceInfo(IServiceID aServiceID)
|
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServices()
|
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServices(IServiceTypeID aServiceTypeID)
|
org.eclipse.equinox.concurrent.future.IFuture |
getAsyncServiceTypes()
|
ID |
getConnectedID()
Get the target ID that this container instance has connected to. |
Namespace |
getConnectNamespace()
Get the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls to IContainer.connect(ID, IConnectContext). |
ID |
getID()
Return the ID for this 'identifiable' object. |
IServiceInfo |
getServiceInfo(IServiceID service)
|
IServiceInfo[] |
getServices()
|
IServiceInfo[] |
getServices(IServiceTypeID type)
|
Namespace |
getServicesNamespace()
|
IServiceTypeID[] |
getServiceTypes()
|
IServiceInfo[] |
purgeCache()
|
void |
registerService(IServiceInfo serviceInfo)
|
void |
removeListener(IContainerListener listener)
Remove listener from IContainer. |
void |
removeServiceListener(IServiceListener listener)
|
void |
removeServiceListener(IServiceTypeID type,
IServiceListener listener)
|
void |
removeServiceTypeListener(IServiceTypeListener listener)
|
void |
unregisterAllServices()
|
void |
unregisterService(IServiceInfo serviceInfo)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingletonDiscoveryContainer(IContainer container)
container - | Method Detail |
|---|
public void connect(ID targetID,
IConnectContext connectContext)
throws ContainerConnectException
IContainer
connect in interface IContainertargetID - the ID of the remote server or group to connect to. See
IContainer.getConnectNamespace() for a explanation of the
constraints upon this parameter.connectContext - any required context to allow this container to authenticate.
May be null if underlying provider does not
have any authentication requirements for connection.
ContainerConnectException - thrown if communication cannot be established with remote
service. Causes can include network connection failure,
authentication failure, server error, or if container is
already connected.public void disconnect()
IContainernull.
disconnect in interface IContainerpublic void dispose()
IContainer
dispose in interface IContainerpublic java.lang.Object getAdapter(java.lang.Class adapter)
IContainerIContainer
should return them using this method. It is recommended that clients use
this method rather than instanceof checks and downcasts to find out about
the capabilities of a specific container.
Typically, after obtaining an IContainer, a client would use this method as a means to obtain a more meaningful interface to the container. This interface may or may not extend IContainer. For example, a client could use the following code to obtain an instance of ISharedObjectContainer:
IContainer newContainer = ContainerFactory.createContainer(type);
ISharedObjectContainer soContainer = (ISharedObjectContainer) newContainer
.getAdapter(ISharedObjectContainer.class);
if (soContainer == null)
throw new ContainerCreateException(message);
Implementations of this method should delegate to
IAdapterManager.loadAdapter() if the service
cannot be provided directly to ensure extensibility by third-party
plug-ins.
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in interface IContaineradapter - the service type to look up
null if this container does not support the given
service
public void addServiceListener(IServiceTypeID type,
IServiceListener listener)
addServiceListener in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic void addServiceTypeListener(IServiceTypeListener listener)
addServiceTypeListener in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic IServiceInfo getServiceInfo(IServiceID service)
getServiceInfo in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic IServiceInfo[] getServices(IServiceTypeID type)
getServices in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic Namespace getServicesNamespace()
getServicesNamespace in interface org.eclipse.ecf.discovery.IDiscoveryAdvertisergetServicesNamespace in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic void registerService(IServiceInfo serviceInfo)
registerService in interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser
public void removeServiceListener(IServiceTypeID type,
IServiceListener listener)
removeServiceListener in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic void removeServiceTypeListener(IServiceTypeListener listener)
removeServiceTypeListener in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic void unregisterService(IServiceInfo serviceInfo)
unregisterService in interface org.eclipse.ecf.discovery.IDiscoveryAdvertiserpublic void addListener(IContainerListener listener)
IContainer| container action | Event |
| connect start | IContainerConnectingEvent |
| connect complete | IContainerConnectedEvent |
| disconnect start | IContainerDisconnectingEvent |
| disconnect complete | IContainerDisconnectedEvent |
addListener in interface IContainerlistener - the IContainerListener to addpublic ID getConnectedID()
IContainer
getConnectedID in interface IContainernull
if container not connected.public Namespace getConnectNamespace()
IContainerIContainer.connect(ID, IConnectContext).
If this method returns null, then it means that
null is expected as a valid parameter in subsequent calls
to IContainer.connect(ID, IConnectContext). If this method returns a non-null
Namespace, then the targetID parameter in
IContainer.connect(ID, IConnectContext) must be non-null
instance created of the returned Namespace.
getConnectNamespace in interface IContainerIContainer.connect(ID, IConnectContext). If null,
then the targetID instances passed to
IContainer.connect(ID, IConnectContext) may be null.
If not null, then targetID
instances passed to IContainer.connect(ID, IConnectContext) must be
instances of the returned Namespace.public ID getID()
IIdentifiablenull.
getID in interface IIdentifiablenull.public void removeListener(IContainerListener listener)
IContainer
removeListener in interface IContainerlistener - the IContainerListener to removepublic IServiceInfo[] getServices()
getServices in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic IServiceTypeID[] getServiceTypes()
getServiceTypes in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic void addServiceListener(IServiceListener listener)
addServiceListener in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic void removeServiceListener(IServiceListener listener)
removeServiceListener in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic IServiceInfo[] purgeCache()
purgeCache in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic org.eclipse.equinox.concurrent.future.IFuture getAsyncServiceInfo(IServiceID aServiceID)
getAsyncServiceInfo in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic org.eclipse.equinox.concurrent.future.IFuture getAsyncServiceTypes()
getAsyncServiceTypes in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic org.eclipse.equinox.concurrent.future.IFuture getAsyncServices()
getAsyncServices in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic org.eclipse.equinox.concurrent.future.IFuture getAsyncServices(IServiceTypeID aServiceTypeID)
getAsyncServices in interface org.eclipse.ecf.discovery.IDiscoveryLocatorpublic void unregisterAllServices()
unregisterAllServices in interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||