public class RemoteCMSListener extends java.lang.Object implements ICMSComponentListener
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
added
The added components, if any (cid->desc).
|
protected java.util.Map |
changed
The changed components, if any (cid->desc).
|
protected IComponentIdentifier |
cid
The local platform cid used as event source.
|
protected IComponentManagementService |
cms
The CMS used for automatic removal of listener.
|
static java.lang.String |
EVENT_BULK
The event type for a removed component (value is collection of change events).
|
static java.lang.String |
EVENT_COMPONENT_ADDED
The event type for an added component (value is component description).
|
static java.lang.String |
EVENT_COMPONENT_CHANGED
The event type for a changed component (value is component description).
|
static java.lang.String |
EVENT_COMPONENT_REMOVED
The event type for a removed component (value is component description).
|
protected java.lang.String |
id
The id for remote listener deregistration.
|
protected static int |
MAX_EVENTS
Maximum number of events per delay period.
|
protected IRemoteChangeListener |
rcl
The change listener (proxy) to be informed about important changes.
|
protected java.util.Map |
removed
The removed components, if any (cid->desc).
|
protected java.util.Timer |
timer
The update timer (if any).
|
protected static long |
UPDATE_DELAY
Update delay.
|
Constructor and Description |
---|
RemoteCMSListener(IComponentIdentifier cid,
java.lang.String id,
IComponentManagementService cms,
IRemoteChangeListener rcl)
Create a CMS listener sending updates to a remote change listener.
|
Modifier and Type | Method and Description |
---|---|
IFuture |
componentAdded(IComponentDescription desc)
Called when a new element has been added.
|
IFuture |
componentChanged(IComponentDescription desc)
Called when a component has changed its state.
|
IFuture |
componentRemoved(IComponentDescription desc,
java.util.Map results)
Called when a new element has been removed.
|
boolean |
equals(java.lang.Object obj)
Test if two objects are equal.
|
int |
hashCode()
Get the hashcode
|
protected void |
startTimer() |
public static final java.lang.String EVENT_COMPONENT_ADDED
public static final java.lang.String EVENT_COMPONENT_CHANGED
public static final java.lang.String EVENT_COMPONENT_REMOVED
public static final java.lang.String EVENT_BULK
protected static final long UPDATE_DELAY
protected static final int MAX_EVENTS
protected IComponentIdentifier cid
protected java.lang.String id
protected IComponentManagementService cms
protected IRemoteChangeListener rcl
protected java.util.Timer timer
protected java.util.Map added
protected java.util.Map changed
protected java.util.Map removed
public RemoteCMSListener(IComponentIdentifier cid, java.lang.String id, IComponentManagementService cms, IRemoteChangeListener rcl)
public IFuture componentAdded(IComponentDescription desc)
componentAdded
in interface ICMSComponentListener
chainid
- The identifier.public IFuture componentChanged(IComponentDescription desc)
componentChanged
in interface ICMSComponentListener
chainid
- The identifier.public IFuture componentRemoved(IComponentDescription desc, java.util.Map results)
componentRemoved
in interface ICMSComponentListener
chainid
- The identifier.protected void startTimer()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object