Package org.eclipse.ecf.provider.generic
Class SOManager
- java.lang.Object
- 
- org.eclipse.ecf.provider.generic.SOManager
 
- 
- All Implemented Interfaces:
- ISharedObjectManager
 
 public class SOManager extends Object implements ISharedObjectManager 
- 
- 
Constructor SummaryConstructors Constructor Description SOManager(SOContainer cont)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddConnector(ISharedObjectConnector conn)IDaddSharedObject(ID sharedObjectID, ISharedObject sharedObject, Map properties)Add an ISharedObject to this container.ISharedObjectConnectorconnectSharedObjects(ID sharedObjectFrom, ID[] sharedObjectsTo)Create an ISharedObjectConnector instance for sending messages from a single ISharedObject to one or more receiver ISharedObjects.protected IDcreateNewSharedObjectID(SharedObjectDescription sd, ISharedObject newObject)IDcreateSharedObject(SharedObjectDescription sd)Create a new ISharedObject within this container from the given SharedObjectDescription.protected ISharedObjectcreateSharedObjectInstance(Class newClass, Class[] argTypes, Object[] args)protected voiddebug(String msg)voiddisconnectSharedObjects(ISharedObjectConnector connector)Destroy an ISharedObjectConnector instance.protected voiddispose()protected Class[]getArgTypes(String[] argTypes, Object[] args, ClassLoader cl)static Class[]getClassesForTypes(String[] argTypes, Object[] args, ClassLoader cl)protected ListgetConnectors()ISharedObjectgetSharedObject(ID sharedObjectID)Get the ISharedObject instance corresponding to the given sharedObjectID.ListgetSharedObjectConnectors(ID sharedObjectFrom)Get the sharedObjectConnectors associated with the given sharedObjectIDID[]getSharedObjectIDs()Get the array of SharedObject instances currently contained by this ISharedObjectContainerprotected ISharedObjectloadSharedObject(SharedObjectDescription sd)protected booleanremoveConnector(ISharedObjectConnector conn)ISharedObjectremoveSharedObject(ID sharedObjectID)Remove the given sharedObjectID from this ISharedObjectContainer.voidsetRemoteAddPolicy(ISharedObjectPolicy policy)Set this shared object manager's policy for adding remote shared objects.protected voidtraceStack(String msg, Throwable e)protected ISharedObjectverifySharedObject(Object newSharedObject)
 
- 
- 
- 
Constructor Detail- 
SOManagerpublic SOManager(SOContainer cont) 
 
- 
 - 
Method Detail- 
debugprotected void debug(String msg) 
 - 
addConnectorprotected void addConnector(ISharedObjectConnector conn) 
 - 
removeConnectorprotected boolean removeConnector(ISharedObjectConnector conn) 
 - 
getConnectorsprotected List getConnectors() 
 - 
getArgTypesprotected Class[] getArgTypes(String[] argTypes, Object[] args, ClassLoader cl) throws ClassNotFoundException - Throws:
- ClassNotFoundException
 
 - 
createSharedObjectInstanceprotected ISharedObject createSharedObjectInstance(Class newClass, Class[] argTypes, Object[] args) throws Exception - Throws:
- Exception
 
 - 
verifySharedObjectprotected ISharedObject verifySharedObject(Object newSharedObject) 
 - 
loadSharedObjectprotected ISharedObject loadSharedObject(SharedObjectDescription sd) throws Exception - Throws:
- Exception
 
 - 
getSharedObjectIDspublic ID[] getSharedObjectIDs() Description copied from interface:ISharedObjectManagerGet the array of SharedObject instances currently contained by this ISharedObjectContainer- Specified by:
- getSharedObjectIDsin interface- ISharedObjectManager
- Returns:
- ID[] the IDs of currently contained ISharedObject instances
 
 - 
createSharedObjectpublic ID createSharedObject(SharedObjectDescription sd) throws SharedObjectCreateException Description copied from interface:ISharedObjectManagerCreate a new ISharedObject within this container from the given SharedObjectDescription.- Specified by:
- createSharedObjectin interface- ISharedObjectManager
- 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
 
 - 
createNewSharedObjectIDprotected ID createNewSharedObjectID(SharedObjectDescription sd, ISharedObject newObject) throws IDCreateException - Throws:
- IDCreateException
 
 - 
addSharedObjectpublic ID addSharedObject(ID sharedObjectID, ISharedObject sharedObject, Map properties) throws SharedObjectAddException Description copied from interface:ISharedObjectManagerAdd an ISharedObject to this container.- Specified by:
- addSharedObjectin 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
 
 - 
getSharedObjectpublic ISharedObject getSharedObject(ID sharedObjectID) Description copied from interface:ISharedObjectManagerGet the ISharedObject instance corresponding to the given sharedObjectID.- Specified by:
- getSharedObjectin interface- ISharedObjectManager
- Parameters:
- sharedObjectID- of the desired ISharedObject
- Returns:
- ISharedObject found. Return null if ISharedObject not found.
 
 - 
removeSharedObjectpublic ISharedObject removeSharedObject(ID sharedObjectID) Description copied from interface:ISharedObjectManagerRemove the given sharedObjectID from this ISharedObjectContainer.- Specified by:
- removeSharedObjectin interface- ISharedObjectManager
- Parameters:
- sharedObjectID- the ID of the ISharedObject to remove
- Returns:
- ISharedObject removed. Returns null if ISharedObject not found
 
 - 
connectSharedObjectspublic ISharedObjectConnector connectSharedObjects(ID sharedObjectFrom, ID[] sharedObjectsTo) throws SharedObjectConnectException Description copied from interface:ISharedObjectManagerCreate 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:
- connectSharedObjectsin 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
 
 - 
disconnectSharedObjectspublic void disconnectSharedObjects(ISharedObjectConnector connector) throws SharedObjectDisconnectException Description copied from interface:ISharedObjectManagerDestroy an ISharedObjectConnector instance.- Specified by:
- disconnectSharedObjectsin interface- ISharedObjectManager
- Parameters:
- connector- the connector previously created via connectSharedObjects
- Throws:
- SharedObjectDisconnectException- thrown if specified connector does not exist in the context of this container
 
 - 
disposeprotected void dispose() 
 - 
getSharedObjectConnectorspublic List getSharedObjectConnectors(ID sharedObjectFrom) Description copied from interface:ISharedObjectManagerGet the sharedObjectConnectors associated with the given sharedObjectID- Specified by:
- getSharedObjectConnectorsin interface- ISharedObjectManager
- Returns:
- List of ISharedObjectConnector instances
 
 - 
getClassesForTypespublic static Class[] getClassesForTypes(String[] argTypes, Object[] args, ClassLoader cl) throws ClassNotFoundException - Throws:
- ClassNotFoundException
 
 - 
setRemoteAddPolicypublic void setRemoteAddPolicy(ISharedObjectPolicy policy) Description copied from interface:ISharedObjectManagerSet this shared object manager's policy for adding remote shared objects.- Specified by:
- setRemoteAddPolicyin 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
 
 
- 
 
-