|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ecf.provider.generic.SOContext
public class SOContext
Field Summary | |
---|---|
protected SOContainer |
container
|
protected ID |
homeContainerID
|
protected boolean |
isActive
|
protected java.util.Map |
properties
|
protected IQueueEnqueue |
queue
|
protected ID |
sharedObjectID
|
Constructor Summary | |
---|---|
SOContext(ID objID,
ID homeID,
SOContainer cont,
java.util.Map props,
IQueueEnqueue queue)
|
Method Summary | |
---|---|
void |
connect(ID groupID,
IConnectContext joinContext)
(non-Javadoc) |
void |
disconnect()
(non-Javadoc) |
java.lang.Object |
getAdapter(java.lang.Class clazz)
|
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) |
boolean |
isGroupServer()
|
protected boolean |
isInactive()
|
protected void |
makeInactive()
|
void |
sendCreate(ID toContainerID,
ReplicaSharedObjectDescription sd)
Send message to create a remote instance of an ISharedObject with the same ID as this instance. |
void |
sendCreateResponse(ID toContainerID,
java.lang.Throwable throwable,
long identifier)
Send create response back to an ISharedObject with the same ID as this instance. |
void |
sendDispose(ID toContainerID)
Send message to dispose of a remote instance of the ISharedObject with same ID as this instance. |
void |
sendMessage(ID toContainerID,
java.lang.Object data)
Send arbitrary message to remote instance of the ISharedObject with same ID as this instance. |
protected void |
trace(java.lang.String msg)
|
protected void |
traceStack(java.lang.String msg,
java.lang.Throwable e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SOContainer container
protected ID sharedObjectID
protected ID homeContainerID
protected boolean isActive
protected java.util.Map properties
protected IQueueEnqueue queue
Constructor Detail |
---|
public SOContext(ID objID, ID homeID, SOContainer cont, java.util.Map props, IQueueEnqueue queue)
Method Detail |
---|
public boolean isActive()
isActive
in interface ISharedObjectContext
protected void trace(java.lang.String msg)
protected void traceStack(java.lang.String msg, java.lang.Throwable e)
protected void makeInactive()
protected boolean isInactive()
public ID getLocalContainerID()
ISharedObjectContext
getLocalContainerID
in interface ISharedObjectContext
public ISharedObjectManager getSharedObjectManager()
ISharedObjectContext
getSharedObjectManager
in interface ISharedObjectContext
public IQueueEnqueue getQueue()
ISharedObjectContext
getQueue
in interface ISharedObjectContext
public void connect(ID groupID, IConnectContext joinContext) throws ContainerConnectException
ISharedObjectContext
connect
in interface ISharedObjectContext
ContainerConnectException
IContainer.connect(ID,IConnectContext)
public void disconnect()
ISharedObjectContext
disconnect
in interface ISharedObjectContext
IContainer.disconnect()
public ID getConnectedID()
ISharedObjectContext
getConnectedID
in interface ISharedObjectContext
IContainer.getConnectedID()
public boolean isGroupManager()
ISharedObjectContext
isGroupManager
in interface ISharedObjectContext
IReliableContainer.isGroupManager()
public boolean isGroupServer()
public ID[] getGroupMemberIDs()
ISharedObjectContext
getGroupMemberIDs
in interface ISharedObjectContext
IReliableContainer.getGroupMemberIDs()
public void sendCreate(ID toContainerID, ReplicaSharedObjectDescription sd) throws java.io.IOException
ISharedObjectContext
sendCreate
in interface ISharedObjectContext
toContainerID
- 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 containerpublic void sendCreateResponse(ID toContainerID, java.lang.Throwable throwable, long identifier) throws java.io.IOException
ISharedObjectContext
sendCreateResponse
in interface ISharedObjectContext
toContainerID
- 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 sentpublic void sendDispose(ID toContainerID) throws java.io.IOException
ISharedObjectContext
sendDispose
in interface ISharedObjectContext
toContainerID
- 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 serializedpublic void sendMessage(ID toContainerID, java.lang.Object data) throws java.io.IOException
ISharedObjectContext
sendMessage
in interface ISharedObjectContext
toContainerID
- 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 serializedpublic java.lang.Object getAdapter(java.lang.Class clazz)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
public Namespace getConnectNamespace()
ISharedObjectContext
getConnectNamespace
in interface ISharedObjectContext
public java.util.Map getLocalContainerProperties()
ISharedObjectContext
getLocalContainerProperties
in interface ISharedObjectContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |