Interface ISharedObjectManager

All Known Implementing Classes:
SOManager

public interface ISharedObjectManager
Manager for creating, disposing, and accessing ISharedObjects from an ISharedObjectContainer.
See Also:
  • Method Details

    • addSharedObject

      ID addSharedObject(ID sharedObjectID, ISharedObject sharedObject, Map properties) throws SharedObjectAddException
      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

      ISharedObjectConnector connectSharedObjects(ID sharedObjectFrom, ID[] sharedObjectsTo) throws SharedObjectConnectException
      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

      void disconnectSharedObjects(ISharedObjectConnector connector) throws SharedObjectDisconnectException
      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

      ISharedObject getSharedObject(ID sharedObjectID)
      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

      ISharedObject removeSharedObject(ID sharedObjectID)
      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

      void setRemoteAddPolicy(ISharedObjectPolicy policy)
      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