org.eclipse.ecf.provider.jslp.container
Class JSLPDiscoveryContainer
java.lang.Object
org.eclipse.ecf.core.AbstractContainer
org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
org.eclipse.ecf.provider.jslp.container.JSLPDiscoveryContainer
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, IContainer, IIdentifiable, org.eclipse.ecf.discovery.IDiscoveryAdvertiser, IDiscoveryContainerAdapter, org.eclipse.ecf.discovery.IDiscoveryLocator, IDiscoveryService
public class JSLPDiscoveryContainer
- extends AbstractDiscoveryContainerAdapter
- implements IDiscoveryService
| Methods inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter |
clearListeners, dispose, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getConnectNamespace, getID, getListeners, getServicesNamespace, removeServiceListener, removeServiceListener, removeServiceTypeListener, unregisterAllServices |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.ecf.discovery.IDiscoveryLocator |
getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getServicesNamespace, removeServiceListener, removeServiceListener, removeServiceTypeListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
| Methods inherited from interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser |
getServicesNamespace, unregisterAllServices |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
REDISCOVER
public static long REDISCOVER
JSLPDiscoveryContainer
public JSLPDiscoveryContainer()
connect
public void connect(ID aTargetID,
IConnectContext connectContext)
throws ContainerConnectException
- Description copied from interface:
IContainer
- Connect to a target remote process or process group. The target
identified by the first parameter (targetID) is connected the
implementation class. If authentication information is required, the
required information is given via via the second parameter
(connectContext).
Callers note that depending upon the provider implementation this method
may block. It is suggested that callers use a separate thread to call
this method.
This method provides an implementation independent way for container
implementations to connect, authenticate, and communicate with a remote
service or group of services. Providers are responsible for implementing
this operation in a way appropriate to the given remote service (or
group) via expected protocol.
- Specified by:
connect in interface IContainer
- Parameters:
aTargetID - 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.
- Throws:
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.
disconnect
public void disconnect()
- Description copied from interface:
IContainer
- Disconnect. This operation will disconnect the local container instance
from any previously joined target or group. Subsequent calls to
getConnectedID() will return
null.
- Specified by:
disconnect in interface IContainer
fireServiceDiscovered
public void fireServiceDiscovered(IServiceInfo iinfo)
fireServiceTypeDiscovered
public void fireServiceTypeDiscovered(IServiceTypeID serviceTypeID)
fireServiceUndiscovered
public void fireServiceUndiscovered(IServiceInfo iinfo)
getConnectedID
public ID getConnectedID()
- Description copied from interface:
IContainer
- Get the target ID that this container instance has connected to. Returns
null if not connected.
- Specified by:
getConnectedID in interface IContainer
- Returns:
- ID of the target we are connected to. Returns
null
if container not connected.
getServiceInfo
public IServiceInfo getServiceInfo(IServiceID service)
- Specified by:
getServiceInfo in interface org.eclipse.ecf.discovery.IDiscoveryLocator
getServiceTypes
public IServiceTypeID[] getServiceTypes()
- Specified by:
getServiceTypes in interface org.eclipse.ecf.discovery.IDiscoveryLocator
getServices
public IServiceInfo[] getServices()
- Specified by:
getServices in interface org.eclipse.ecf.discovery.IDiscoveryLocator
getServices
public IServiceInfo[] getServices(IServiceTypeID type)
- Specified by:
getServices in interface org.eclipse.ecf.discovery.IDiscoveryLocator
registerService
public void registerService(IServiceInfo aServiceInfo)
- Specified by:
registerService in interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser
unregisterService
public void unregisterService(IServiceInfo aServiceInfo)
- Specified by:
unregisterService in interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser
purgeCache
public IServiceInfo[] purgeCache()
- Specified by:
purgeCache in interface org.eclipse.ecf.discovery.IDiscoveryLocator- Overrides:
purgeCache in class AbstractDiscoveryContainerAdapter
- See Also:
IDiscoveryLocator.purgeCache()
addServiceListener
public void addServiceListener(IServiceListener listener)
- Specified by:
addServiceListener in interface org.eclipse.ecf.discovery.IDiscoveryLocator- Overrides:
addServiceListener in class AbstractDiscoveryContainerAdapter
addServiceListener
public void addServiceListener(IServiceTypeID type,
IServiceListener listener)
- Specified by:
addServiceListener in interface org.eclipse.ecf.discovery.IDiscoveryLocator- Overrides:
addServiceListener in class AbstractDiscoveryContainerAdapter
addServiceTypeListener
public void addServiceTypeListener(IServiceTypeListener listener)
- Specified by:
addServiceTypeListener in interface org.eclipse.ecf.discovery.IDiscoveryLocator- Overrides:
addServiceTypeListener in class AbstractDiscoveryContainerAdapter