All Known Implementing Classes:
SOManager
public interface ISharedObjectManager
Manager for creating, disposing, and accessing ISharedObjects from an
ISharedObjectContainer.
See Also:
Method Summary
All Methods Instance Methods Abstract Methods
Add an ISharedObject to this container.
Create an ISharedObjectConnector instance for sending messages from a
single ISharedObject to one or more receiver ISharedObjects.
Create a new ISharedObject within this container from the given
SharedObjectDescription.
void
Destroy an ISharedObjectConnector instance.
Get the ISharedObject instance corresponding to the given sharedObjectID.
Get the sharedObjectConnectors associated with the given sharedObjectID
Get the array of SharedObject instances currently contained by this
ISharedObjectContainer
Remove the given sharedObjectID from this ISharedObjectContainer.
void
Set this shared object manager's policy for adding remote shared objects.
Method Details
addSharedObject
Add an ISharedObject to this container.
Parameters:
sharedObjectID
- the ID of new SharedObject
sharedObject
- the ISharedObject instance to add
properties
- the Map associated with the added ISharedObject
Returns:
ID the sharedObjectID of the added ISharedObject
Throws:
SharedObjectAddException
- if the add cannot be accomplished for any reason
connectSharedObjects
Create an ISharedObjectConnector instance for sending messages from a
single ISharedObject to one or more receiver ISharedObjects. All
specified ISharedObject instances must be contained by this
ISharedObjectContainer.
Parameters:
sharedObjectFrom
- the ID of the sender ISharedObject
sharedObjectsTo
- the ID[] of the receiver ISharedObjects
Returns:
a valid instance of ISharedObjectConnector. Null if no connector
can be made
Throws:
SharedObjectConnectException
- thrown if specified sender or receivers do not exist within
the context of this container
createSharedObject
Create a new ISharedObject within this container from the given
SharedObjectDescription.
Parameters:
sd
- the SharedObjectDescription that describes the SharedObject to
be created
Returns:
ID the sharedObjectID of the added ISharedObject
Throws:
SharedObjectCreateException
- if the SharedObject cannot be created
disconnectSharedObjects
Destroy an ISharedObjectConnector instance.
Parameters:
connector
- the connector previously created via connectSharedObjects
Throws:
SharedObjectDisconnectException
- thrown if specified connector does not exist in the context
of this container
getSharedObject
Get the ISharedObject instance corresponding to the given sharedObjectID.
Parameters:
sharedObjectID
- of the desired ISharedObject
Returns:
ISharedObject found. Return null if ISharedObject not found.
getSharedObjectConnectors
List getSharedObjectConnectors (ID sharedObjectFrom)
Get the sharedObjectConnectors associated with the given sharedObjectID
Returns:
List of ISharedObjectConnector instances
getSharedObjectIDs
ID [] getSharedObjectIDs ()
Get the array of SharedObject instances currently contained by this
ISharedObjectContainer
Returns:
ID[] the IDs of currently contained ISharedObject instances
removeSharedObject
Remove the given sharedObjectID from this ISharedObjectContainer.
Parameters:
sharedObjectID
- the ID of the ISharedObject to remove
Returns:
ISharedObject removed. Returns null if ISharedObject not found
setRemoteAddPolicy
Set this shared object manager's policy for adding remote shared objects.
Parameters:
policy
- the ISharedObjectPolicy instance to use to check the validity
of remote requests to add/replicate a shared object into this
container