Interface ISharedObject
-
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
- All Known Implementing Classes:
BaseSharedObject
,DistributedEventAdmin
,OptimisticSharedObject
,RegistrySharedObject
,SharedModel
,TransactionSharedObject
public interface ISharedObject extends org.eclipse.core.runtime.IAdaptable
Core interface for implementing components that exist withinISharedObjectContainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose(ID containerID)
Method called by the ISharedObjectContainer upon ISharedObject destruction.void
handleEvent(Event event)
Handle Event passed to this IEventHandler.void
handleEvents(Event[] events)
Handle Events passed to this IEventHandler.void
init(ISharedObjectConfig initData)
Initialize this ISharedObject.
-
-
-
Method Detail
-
init
void init(ISharedObjectConfig initData) throws SharedObjectInitException
Initialize this ISharedObject. The ISharedObjectContainer for this ISharedObject must call this method with a non-null instance of ISharedObjectConfig. ISharedObject implementations can use this initialization to perform any initialization necessary prior to receiving any events (via handleEvent/s). Note that the ISharedObjectContext provided via the ISharedObjectConfig.getSharedObjectContext() method is not guaranteed to allow any method calls until after this init() method call has completed.- Parameters:
initData
- the initialization data passed by the ISharedObjectContainer upon initialization- Throws:
SharedObjectInitException
- thrown by ISharedObject to halt initialization. ISharedObjectContainers must respond to such an exception by halting the addition of the ISharedObject instance and treating it as not in the container.
-
handleEvent
void handleEvent(Event event)
Handle Event passed to this IEventHandler.- Parameters:
event
- the Event for the implementer to handle
-
handleEvents
void handleEvents(Event[] events)
Handle Events passed to this IEventHandler.- Parameters:
events
- the Events [] for the implementer to handle
-
dispose
void dispose(ID containerID)
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.- Parameters:
containerID
- the ID of the container that is disposing this ISharedObject
-
-