public class SOManager extends Object implements ISharedObjectManager
| Constructor and Description |
|---|
SOManager(SOContainer cont) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConnector(ISharedObjectConnector conn) |
ID |
addSharedObject(ID sharedObjectID,
ISharedObject sharedObject,
Map properties)
Add an ISharedObject to this container.
|
ISharedObjectConnector |
connectSharedObjects(ID sharedObjectFrom,
ID[] sharedObjectsTo)
Create an ISharedObjectConnector instance for sending messages from a
single ISharedObject to one or more receiver ISharedObjects.
|
protected ID |
createNewSharedObjectID(SharedObjectDescription sd,
ISharedObject newObject) |
ID |
createSharedObject(SharedObjectDescription sd)
Create a new ISharedObject within this container from the given
SharedObjectDescription.
|
protected ISharedObject |
createSharedObjectInstance(Class newClass,
Class[] argTypes,
Object[] args) |
protected void |
debug(String msg) |
void |
disconnectSharedObjects(ISharedObjectConnector connector)
Destroy an ISharedObjectConnector instance.
|
protected void |
dispose() |
protected Class[] |
getArgTypes(String[] argTypes,
Object[] args,
ClassLoader cl) |
static Class[] |
getClassesForTypes(String[] argTypes,
Object[] args,
ClassLoader cl) |
protected List |
getConnectors() |
ISharedObject |
getSharedObject(ID sharedObjectID)
Get the ISharedObject instance corresponding to the given sharedObjectID.
|
List |
getSharedObjectConnectors(ID sharedObjectFrom)
Get the sharedObjectConnectors associated with the given sharedObjectID
|
ID[] |
getSharedObjectIDs()
Get the array of SharedObject instances currently contained by this
ISharedObjectContainer
|
protected ISharedObject |
loadSharedObject(SharedObjectDescription sd) |
protected boolean |
removeConnector(ISharedObjectConnector conn) |
ISharedObject |
removeSharedObject(ID sharedObjectID)
Remove the given sharedObjectID from this ISharedObjectContainer.
|
void |
setRemoteAddPolicy(ISharedObjectPolicy policy)
Set this shared object manager's policy for adding remote shared objects.
|
protected void |
traceStack(String msg,
Throwable e) |
protected ISharedObject |
verifySharedObject(Object newSharedObject) |
public SOManager(SOContainer cont)
protected void debug(String msg)
protected void addConnector(ISharedObjectConnector conn)
protected boolean removeConnector(ISharedObjectConnector conn)
protected List getConnectors()
protected Class[] getArgTypes(String[] argTypes, Object[] args, ClassLoader cl) throws ClassNotFoundException
ClassNotFoundExceptionprotected ISharedObject createSharedObjectInstance(Class newClass, Class[] argTypes, Object[] args) throws Exception
Exceptionprotected ISharedObject verifySharedObject(Object newSharedObject)
protected ISharedObject loadSharedObject(SharedObjectDescription sd) throws Exception
Exceptionpublic ID[] getSharedObjectIDs()
ISharedObjectManagergetSharedObjectIDs in interface ISharedObjectManagerpublic ID createSharedObject(SharedObjectDescription sd) throws SharedObjectCreateException
ISharedObjectManagercreateSharedObject in interface ISharedObjectManagersd - the SharedObjectDescription that describes the SharedObject to
be createdSharedObjectCreateException - if the SharedObject cannot be createdprotected ID createNewSharedObjectID(SharedObjectDescription sd, ISharedObject newObject) throws IDCreateException
IDCreateExceptionpublic ID addSharedObject(ID sharedObjectID, ISharedObject sharedObject, Map properties) throws SharedObjectAddException
ISharedObjectManageraddSharedObject in interface ISharedObjectManagersharedObjectID - the ID of new SharedObjectsharedObject - the ISharedObject instance to addproperties - the Map associated with the added ISharedObjectSharedObjectAddException - if the add cannot be accomplished for any reasonpublic ISharedObject getSharedObject(ID sharedObjectID)
ISharedObjectManagergetSharedObject in interface ISharedObjectManagersharedObjectID - of the desired ISharedObjectpublic ISharedObject removeSharedObject(ID sharedObjectID)
ISharedObjectManagerremoveSharedObject in interface ISharedObjectManagersharedObjectID - the ID of the ISharedObject to removepublic ISharedObjectConnector connectSharedObjects(ID sharedObjectFrom, ID[] sharedObjectsTo) throws SharedObjectConnectException
ISharedObjectManagerconnectSharedObjects in interface ISharedObjectManagersharedObjectFrom - the ID of the sender ISharedObjectsharedObjectsTo - the ID[] of the receiver ISharedObjectsSharedObjectConnectException - thrown if specified sender or receivers do not exist within
the context of this containerpublic void disconnectSharedObjects(ISharedObjectConnector connector) throws SharedObjectDisconnectException
ISharedObjectManagerdisconnectSharedObjects in interface ISharedObjectManagerconnector - the connector previously created via connectSharedObjectsSharedObjectDisconnectException - thrown if specified connector does not exist in the context
of this containerprotected void dispose()
public List getSharedObjectConnectors(ID sharedObjectFrom)
ISharedObjectManagergetSharedObjectConnectors in interface ISharedObjectManagerpublic static Class[] getClassesForTypes(String[] argTypes, Object[] args, ClassLoader cl) throws ClassNotFoundException
ClassNotFoundExceptionpublic void setRemoteAddPolicy(ISharedObjectPolicy policy)
ISharedObjectManagersetRemoteAddPolicy in interface ISharedObjectManagerpolicy - the ISharedObjectPolicy instance to use to check the validity
of remote requests to add/replicate a shared object into this
containerCopyright © 2004–2020 Eclipse Foundation. All rights reserved.