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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SharedModel.Property
-
Field Summary
Fields Modifier and Type Field Description protected String
SEND_PROPERTY_TO_MSG
-
Fields inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObject
DESTROYREMOTE_CODE, DESTROYSELFLOCAL_CODE
-
-
Constructor Summary
Constructors Constructor Description SharedModel()
-
Method Summary
-
Methods inherited from class org.eclipse.ecf.core.sharedobject.OptimisticSharedObject
initialize
-
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
-
-
-
-
Field Detail
-
SEND_PROPERTY_TO_MSG
protected final String SEND_PROPERTY_TO_MSG
- See Also:
- Constant Field Values
-
-
Method Detail
-
addListener
public boolean addListener(ISharedModelListener listener)
-
removeListener
public boolean removeListener(ISharedModelListener listener)
-
handleListenerException
protected void handleListenerException(ISharedModelListener l, 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 interfaceISharedObject
- Overrides:
dispose
in classBaseSharedObject
- Parameters:
containerID
- the ID of the container that is disposing this ISharedObject
-
copyProperties
protected Collection<SharedModel.Property> copyProperties()
-
addProperty
protected SharedModel.Property addProperty(String name)
-
addProperty
protected SharedModel.Property addProperty(String name, Object value)
-
addProperty
protected SharedModel.Property addProperty(SharedModel.Property property)
-
removeProperty
protected SharedModel.Property removeProperty(String propertyName)
-
getProperty
protected SharedModel.Property getProperty(String propertyName)
-
getOrAddProperty
protected SharedModel.Property getOrAddProperty(String propertyName)
-
setOrAddProperty
protected SharedModel.Property setOrAddProperty(String propertyName, Object value)
-
removeAllProperties
protected void removeAllProperties()
-
sendPropertyTo
protected final void sendPropertyTo(ID target, String msg, SharedModel.Property property) throws IOException
- Throws:
IOException
-
sendPropertyTo
protected final void sendPropertyTo(ID target, SharedModel.Property property) throws IOException
- Throws:
IOException
-
handleSharedObjectMsg
protected boolean handleSharedObjectMsg(ID fromID, SharedObjectMsg msg)
- Overrides:
handleSharedObjectMsg
in classBaseSharedObject
-
handlePropertyTo
protected boolean handlePropertyTo(ID fromID, String msg, SharedModel.Property property)
-
-