public class BaseContainer extends AbstractContainer
Modifier and Type | Class and Description |
---|---|
static class |
BaseContainer.Instantiator |
Modifier | Constructor and Description |
---|---|
protected |
BaseContainer(ID id) |
protected |
BaseContainer(long idl) |
Modifier and Type | Method and Description |
---|---|
void |
connect(ID targetID,
IConnectContext connectContext)
Connect to a target remote process or process group.
|
void |
disconnect()
Disconnect.
|
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.
|
java.lang.String |
toString() |
addListener, dispose, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener
protected BaseContainer(long idl) throws ContainerCreateException
ContainerCreateException
protected BaseContainer(ID id)
public void connect(ID targetID, IConnectContext connectContext) throws ContainerConnectException
IContainer
targetID
- 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()
IContainer
null
.public Namespace getConnectNamespace()
IContainer
IContainer.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 ID getConnectedID()
IContainer
null
if container not connected.public ID getID()
IIdentifiable
null
.null
.public java.lang.String toString()
toString
in class java.lang.Object