org.eclipse.ecf.core.sharedobject.model
Class SharedModel
java.lang.Object
org.eclipse.ecf.core.sharedobject.BaseSharedObject
org.eclipse.ecf.core.sharedobject.OptimisticSharedObject
org.eclipse.ecf.core.sharedobject.model.SharedModel
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, IIdentifiable, ISharedObject
public class SharedModel
- extends OptimisticSharedObject
- Since:
- 2.4
Method Summary |
boolean |
addListener(ISharedModelListener listener)
|
protected SharedModel.Property |
addProperty(SharedModel.Property property)
|
protected SharedModel.Property |
addProperty(java.lang.String name)
|
protected SharedModel.Property |
addProperty(java.lang.String name,
java.lang.Object value)
|
protected java.util.Collection<SharedModel.Property> |
copyProperties()
|
void |
dispose(ID containerID)
Method called by the ISharedObjectContainer upon ISharedObject
destruction. |
protected void |
fireListeners(ISharedModelEvent event)
|
protected java.util.Map<java.lang.String,?> |
getMapFromProperties()
|
protected SharedModel.Property |
getOrAddProperty(java.lang.String propertyName)
|
protected SharedModel.Property |
getProperty(java.lang.String propertyName)
|
protected void |
handleListenerException(ISharedModelListener l,
java.lang.Throwable exception)
|
protected boolean |
handlePropertyTo(ID fromID,
java.lang.String msg,
SharedModel.Property property)
|
protected boolean |
handleSharedObjectMsg(ID fromID,
SharedObjectMsg msg)
|
protected void |
removeAllProperties()
|
boolean |
removeListener(ISharedModelListener listener)
|
protected SharedModel.Property |
removeProperty(java.lang.String propertyName)
|
protected void |
sendPropertyTo(ID target,
SharedModel.Property property)
|
protected void |
sendPropertyTo(ID target,
java.lang.String msg,
SharedModel.Property property)
|
protected SharedModel.Property |
setOrAddProperty(java.lang.String propertyName,
java.lang.Object value)
|
protected void |
setPropertiesFromMap(java.util.Map<java.lang.String,?> map)
|
Methods inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObject |
addEventProcessor, clearEventProcessors, creationCompleted, destroyRemote, destroySelf, destroySelfLocal, fireEventProcessors, getAdapter, getConfig, getConnectedID, getContext, getGroupMemberIDs, getHomeContainerID, getID, getLocalContainerID, getProperties, getReplicaDescription, getReplicaDescriptions, getSharedObjectMsgFromEvent, handleEvent, handleEvents, handleSharedObjectCreateResponseEvent, handleSharedObjectMsg, handleSharedObjectMsgEvent, handleUnhandledEvent, init, isConnected, isPrimary, log, log, removeEventProcessor, replicateToRemoteContainers, sendSharedObjectMsgTo, sendSharedObjectMsgToPrimary, sendSharedObjectMsgToSelf, trace, traceCatching, traceEntering, traceEntering, traceEntering, traceExiting, traceExiting |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEND_PROPERTY_TO_MSG
protected final java.lang.String SEND_PROPERTY_TO_MSG
- See Also:
- Constant Field Values
SharedModel
public SharedModel()
addListener
public boolean addListener(ISharedModelListener listener)
removeListener
public boolean removeListener(ISharedModelListener listener)
handleListenerException
protected void handleListenerException(ISharedModelListener l,
java.lang.Throwable exception)
fireListeners
protected void fireListeners(ISharedModelEvent event)
dispose
public void dispose(ID containerID)
- Description copied from interface:
ISharedObject
- Method called by the ISharedObjectContainer upon ISharedObject
destruction. Once this method is called, no more Events will be passed to
a ISharedObject until the init method is called again.
- Specified by:
dispose
in interface ISharedObject
- Overrides:
dispose
in class BaseSharedObject
- Parameters:
containerID
- the ID of the container that is disposing this ISharedObject
copyProperties
protected java.util.Collection<SharedModel.Property> copyProperties()
addProperty
protected SharedModel.Property addProperty(java.lang.String name)
addProperty
protected SharedModel.Property addProperty(java.lang.String name,
java.lang.Object value)
addProperty
protected SharedModel.Property addProperty(SharedModel.Property property)
removeProperty
protected SharedModel.Property removeProperty(java.lang.String propertyName)
getProperty
protected SharedModel.Property getProperty(java.lang.String propertyName)
getOrAddProperty
protected SharedModel.Property getOrAddProperty(java.lang.String propertyName)
setOrAddProperty
protected SharedModel.Property setOrAddProperty(java.lang.String propertyName,
java.lang.Object value)
removeAllProperties
protected void removeAllProperties()
getMapFromProperties
protected java.util.Map<java.lang.String,?> getMapFromProperties()
setPropertiesFromMap
protected void setPropertiesFromMap(java.util.Map<java.lang.String,?> map)
sendPropertyTo
protected final void sendPropertyTo(ID target,
java.lang.String msg,
SharedModel.Property property)
throws java.io.IOException
- Throws:
java.io.IOException
sendPropertyTo
protected final void sendPropertyTo(ID target,
SharedModel.Property property)
throws java.io.IOException
- Throws:
java.io.IOException
handleSharedObjectMsg
protected boolean handleSharedObjectMsg(ID fromID,
SharedObjectMsg msg)
- Overrides:
handleSharedObjectMsg
in class BaseSharedObject
handlePropertyTo
protected boolean handlePropertyTo(ID fromID,
java.lang.String msg,
SharedModel.Property property)