public class SOManager extends java.lang.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,
java.util.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(java.lang.Class newClass,
java.lang.Class[] argTypes,
java.lang.Object[] args) |
protected void |
debug(java.lang.String msg) |
void |
disconnectSharedObjects(ISharedObjectConnector connector)
Destroy an ISharedObjectConnector instance.
|
protected void |
dispose() |
protected java.lang.Class[] |
getArgTypes(java.lang.String[] argTypes,
java.lang.Object[] args,
java.lang.ClassLoader cl) |
static java.lang.Class[] |
getClassesForTypes(java.lang.String[] argTypes,
java.lang.Object[] args,
java.lang.ClassLoader cl) |
protected java.util.List |
getConnectors() |
ISharedObject |
getSharedObject(ID sharedObjectID)
Get the ISharedObject instance corresponding to the given sharedObjectID.
|
java.util.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(java.lang.String msg,
java.lang.Throwable e) |
protected ISharedObject |
verifySharedObject(java.lang.Object newSharedObject) |
public SOManager(SOContainer cont)
protected void debug(java.lang.String msg)
protected void traceStack(java.lang.String msg,
java.lang.Throwable e)
protected void addConnector(ISharedObjectConnector conn)
protected boolean removeConnector(ISharedObjectConnector conn)
protected java.util.List getConnectors()
protected java.lang.Class[] getArgTypes(java.lang.String[] argTypes,
java.lang.Object[] args,
java.lang.ClassLoader cl)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionprotected ISharedObject createSharedObjectInstance(java.lang.Class newClass, java.lang.Class[] argTypes, java.lang.Object[] args) throws java.lang.Exception
java.lang.Exceptionprotected ISharedObject verifySharedObject(java.lang.Object newSharedObject)
protected ISharedObject loadSharedObject(SharedObjectDescription sd) throws java.lang.Exception
java.lang.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, java.util.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 java.util.List getSharedObjectConnectors(ID sharedObjectFrom)
ISharedObjectManagergetSharedObjectConnectors in interface ISharedObjectManagerpublic static java.lang.Class[] getClassesForTypes(java.lang.String[] argTypes,
java.lang.Object[] args,
java.lang.ClassLoader cl)
throws java.lang.ClassNotFoundException
java.lang.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
container