public abstract class AbstractRSAContainer extends AbstractContainer
| Constructor and Description |
|---|
AbstractRSAContainer(ID id) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(ID targetID,
IConnectContext connectContext)
Connect to a target remote process or process group.
|
protected RSARemoteServiceContainerAdapter |
createContainerAdapter() |
void |
disconnect()
Disconnect.
|
void |
dispose()
Dispose this IContainer instance.
|
protected abstract Map<String,Object> |
exportRemoteService(RSARemoteServiceContainerAdapter.RSARemoteServiceRegistration registration)
Export an endpoint specified by the RSARemoteServiceRegistration.
|
Object |
getAdapter(Class serviceType)
This specialization of IAdaptable.getAdapter() returns additional
services supported by this container.
|
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.
|
protected abstract void |
unexportRemoteService(RSARemoteServiceContainerAdapter.RSARemoteServiceRegistration registration)
Unregister the endpoint for the given RSARemoteServiceRegistration.
|
addListener, fireContainerEvent, getPasswordFromConnectContext, removeListenerpublic AbstractRSAContainer(ID id)
protected abstract Map<String,Object> exportRemoteService(RSARemoteServiceContainerAdapter.RSARemoteServiceRegistration registration)
registration - the RSARemoteServiceRegistration that is being registered. Will not
be null.null, in which case no properties will be overridden or added.protected abstract void unexportRemoteService(RSARemoteServiceContainerAdapter.RSARemoteServiceRegistration registration)
registration - the registration identifying the remote service to unregister. Will not
be null.protected RSARemoteServiceContainerAdapter createContainerAdapter()
public void connect(ID targetID, IConnectContext connectContext) throws ContainerConnectException
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 ID getConnectedID()
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.IContainer.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 void disconnect()
IContainernull.public ID getID()
IIdentifiablenull.null.public void dispose()
IContainerdispose in interface IContainerdispose in class AbstractContainerpublic Object getAdapter(Class serviceType)
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 IContainergetAdapter in class AbstractContainerserviceType - the service type to look upnull if this container does not support the given
serviceCopyright © 2004–2020 Eclipse Foundation. All rights reserved.