|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISharedObjectContext
Context reference provided to all ISharedObjects upon initialization.
Implementers of this interface provide a runtime context for ISharedObject
instances. Upon initialization within a container (see
ISharedObject.init(ISharedObjectConfig)
, ISharedObject instances can
access an instance of this context by calling
ISharedObjectConfig.getContext()
. They then can have access to the
functions provided by this context object for use in implementing their
behavior.
ISharedObject.init(org.eclipse.ecf.core.sharedobject.ISharedObjectConfig)
,
ISharedObjectConfig.getContext()
Method Summary | |
---|---|
void |
connect(ID targetID,
IConnectContext connectContext)
(non-Javadoc) |
void |
disconnect()
(non-Javadoc) |
ID |
getConnectedID()
(non-Javadoc) |
Namespace |
getConnectNamespace()
Get the Namespace instance that defines the ID type expected by the remote target container |
ID[] |
getGroupMemberIDs()
(non-Javadoc) |
ID |
getLocalContainerID()
Get the local container instance's ID |
java.util.Map |
getLocalContainerProperties()
Get local container properties that it wishes to expose to shared object access |
IQueueEnqueue |
getQueue()
Get the IQueueEnqueue instance associated with this ISharedObject. |
ISharedObjectManager |
getSharedObjectManager()
Get the ISharedObjectManager for this context |
boolean |
isActive()
|
boolean |
isGroupManager()
(non-Javadoc) |
void |
sendCreate(ID targetID,
ReplicaSharedObjectDescription sd)
Send message to create a remote instance of an ISharedObject with the same ID as this instance. |
void |
sendCreateResponse(ID targetID,
java.lang.Throwable throwable,
long identifier)
Send create response back to an ISharedObject with the same ID as this instance. |
void |
sendDispose(ID targetID)
Send message to dispose of a remote instance of the ISharedObject with same ID as this instance. |
void |
sendMessage(ID targetID,
java.lang.Object data)
Send arbitrary message to remote instance of the ISharedObject with same ID as this instance. |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
---|
boolean isActive()
ID getLocalContainerID()
ISharedObjectManager getSharedObjectManager()
IQueueEnqueue getQueue()
void connect(ID targetID, IConnectContext connectContext) throws ContainerConnectException
ContainerConnectException
IContainer.connect(ID,IConnectContext)
void disconnect()
IContainer.disconnect()
ID getConnectedID()
IContainer.getConnectedID()
boolean isGroupManager()
IReliableContainer.isGroupManager()
ID[] getGroupMemberIDs()
IReliableContainer.getGroupMemberIDs()
void sendCreate(ID targetID, ReplicaSharedObjectDescription sd) throws java.io.IOException
targetID
- the ID of the remote that is the target
of the create request. If this parameter is null, the request
is assumed to be made of all currently in the
given group (excepting the local container).sd
- the ReplicaSharedObjectDescription describing the class,
constructor and other properties to be associated with the new
instance
java.io.IOException
- thrown if message cannot be sent by containervoid sendCreateResponse(ID targetID, java.lang.Throwable throwable, long identifier) throws java.io.IOException
targetID
- the ID of the target that is to receive this responsethrowable
- a throwable associated with the creation. Null means that no
exception occurredidentifier
- the identifier used in the original create message (in the
shared object description)
java.io.IOException
- thrown if the create response cannot be sentvoid sendDispose(ID targetID) throws java.io.IOException
targetID
- the ID of the remote that is the target
of the dispose request. If this parameter is null, the request
is assumed to be made of all remotes
currently in the given group (excepting the local container).
java.io.IOException
- thrown if message cannot be sent by container, or if data
cannot be serializedvoid sendMessage(ID targetID, java.lang.Object data) throws java.io.IOException
targetID
- the ID of the remote that is the target
for the sendMessage. If this parameter is null,
the message is sent to the entire group membership all remote
containers currently in the given group (excepting the local
container).data
- arbitrary message object. The allowable types of this
parameter are dependent upon the type of the underlying
implementing container
java.io.IOException
- thrown if message cannot be sent by container, or if data
cannot be serializedNamespace getConnectNamespace()
java.util.Map getLocalContainerProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |