Class SOManager

    • Constructor Detail

    • Method Detail

      • debug

        protected void debug​(java.lang.String msg)
      • traceStack

        protected void traceStack​(java.lang.String msg,
                                  java.lang.Throwable e)
      • getConnectors

        protected java.util.List getConnectors()
      • getArgTypes

        protected java.lang.Class[] getArgTypes​(java.lang.String[] argTypes,
                                                java.lang.Object[] args,
                                                java.lang.ClassLoader cl)
                                         throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • createSharedObjectInstance

        protected ISharedObject createSharedObjectInstance​(java.lang.Class newClass,
                                                           java.lang.Class[] argTypes,
                                                           java.lang.Object[] args)
                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • verifySharedObject

        protected ISharedObject verifySharedObject​(java.lang.Object newSharedObject)
      • getSharedObjectIDs

        public ID[] getSharedObjectIDs()
        Description copied from interface: ISharedObjectManager
        Get the array of SharedObject instances currently contained by this ISharedObjectContainer
        Specified by:
        getSharedObjectIDs in interface ISharedObjectManager
        Returns:
        ID[] the IDs of currently contained ISharedObject instances
      • addSharedObject

        public ID addSharedObject​(ID sharedObjectID,
                                  ISharedObject sharedObject,
                                  java.util.Map properties)
                           throws SharedObjectAddException
        Description copied from interface: ISharedObjectManager
        Add an ISharedObject to this container.
        Specified by:
        addSharedObject in interface ISharedObjectManager
        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
      • getSharedObject

        public ISharedObject getSharedObject​(ID sharedObjectID)
        Description copied from interface: ISharedObjectManager
        Get the ISharedObject instance corresponding to the given sharedObjectID.
        Specified by:
        getSharedObject in interface ISharedObjectManager
        Parameters:
        sharedObjectID - of the desired ISharedObject
        Returns:
        ISharedObject found. Return null if ISharedObject not found.
      • removeSharedObject

        public ISharedObject removeSharedObject​(ID sharedObjectID)
        Description copied from interface: ISharedObjectManager
        Remove the given sharedObjectID from this ISharedObjectContainer.
        Specified by:
        removeSharedObject in interface ISharedObjectManager
        Parameters:
        sharedObjectID - the ID of the ISharedObject to remove
        Returns:
        ISharedObject removed. Returns null if ISharedObject not found
      • connectSharedObjects

        public ISharedObjectConnector connectSharedObjects​(ID sharedObjectFrom,
                                                           ID[] sharedObjectsTo)
                                                    throws SharedObjectConnectException
        Description copied from interface: ISharedObjectManager
        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.
        Specified by:
        connectSharedObjects in interface ISharedObjectManager
        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
      • dispose

        protected void dispose()
      • getSharedObjectConnectors

        public java.util.List getSharedObjectConnectors​(ID sharedObjectFrom)
        Description copied from interface: ISharedObjectManager
        Get the sharedObjectConnectors associated with the given sharedObjectID
        Specified by:
        getSharedObjectConnectors in interface ISharedObjectManager
        Returns:
        List of ISharedObjectConnector instances
      • getClassesForTypes

        public static java.lang.Class[] getClassesForTypes​(java.lang.String[] argTypes,
                                                           java.lang.Object[] args,
                                                           java.lang.ClassLoader cl)
                                                    throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • setRemoteAddPolicy

        public void setRemoteAddPolicy​(ISharedObjectPolicy policy)
        Description copied from interface: ISharedObjectManager
        Set this shared object manager's policy for adding remote shared objects.
        Specified by:
        setRemoteAddPolicy in interface ISharedObjectManager
        Parameters:
        policy - the ISharedObjectPolicy instance to use to check the validity of remote requests to add/replicate a shared object into this container