public abstract class RemoteChangeListenerHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected MultiCollection<java.lang.String,java.lang.Object> |
added
The added elements (if any).
|
protected MultiCollection<java.lang.String,java.lang.Object> |
changed
The changed elements (if any).
|
static java.lang.String |
EVENT_ADDED
The event type suffix for added events.
|
static java.lang.String |
EVENT_BULK
The event type for bulk events.
|
static java.lang.String |
EVENT_CHANGED
The event type suffix for changed events.
|
static java.lang.String |
EVENT_OCCURRED
The event type suffix for occurred events.
|
static java.lang.String |
EVENT_REMOVED
The event type suffix for removed events.
|
protected java.lang.String |
id
The id for remote listener deregistration.
|
protected IInternalAccess |
instance
The component instance.
|
protected static int |
MAX_EVENTS
Maximum number of events per delay period.
|
protected MultiCollection<java.lang.String,java.lang.Object> |
occurred
The listed occurrences (if any).
|
protected IRemoteChangeListener |
rcl
The change listener (proxy) to be informed about important changes.
|
protected MultiCollection<java.lang.String,java.lang.Object> |
removed
The removed elements (if any).
|
protected boolean |
started
The flag that the timer has been started.
|
protected java.util.Timer |
timer
The update timer (if any).
|
protected static long |
UPDATE_DELAY
Update delay.
|
Constructor and Description |
---|
RemoteChangeListenerHandler(java.lang.String id,
IInternalAccess instance,
IRemoteChangeListener rcl)
Create a BDI listener.
|
Modifier and Type | Method and Description |
---|---|
protected void |
dispose()
Remove local listeners.
|
void |
elementAdded(java.lang.String type,
java.lang.Object value)
An element was added.
|
void |
elementChanged(java.lang.String type,
java.lang.Object value)
An element was changed.
|
void |
elementRemoved(java.lang.String type,
java.lang.Object value)
An element was removed.
|
boolean |
equals(java.lang.Object obj)
Test equality based on id.
|
int |
hashCode()
Hash code based on id.
|
void |
occurrenceAppeared(java.lang.String type,
java.lang.Object value)
An occurrence appeared.
|
protected void |
startTimer() |
public static final java.lang.String EVENT_ADDED
public static final java.lang.String EVENT_REMOVED
public static final java.lang.String EVENT_CHANGED
public static final java.lang.String EVENT_OCCURRED
public static final java.lang.String EVENT_BULK
protected static final long UPDATE_DELAY
protected static final int MAX_EVENTS
protected java.lang.String id
protected IInternalAccess instance
protected IRemoteChangeListener rcl
protected MultiCollection<java.lang.String,java.lang.Object> added
protected MultiCollection<java.lang.String,java.lang.Object> changed
protected MultiCollection<java.lang.String,java.lang.Object> removed
protected MultiCollection<java.lang.String,java.lang.Object> occurred
protected java.util.Timer timer
protected boolean started
public RemoteChangeListenerHandler(java.lang.String id, IInternalAccess instance, IRemoteChangeListener rcl)
public void elementAdded(java.lang.String type, java.lang.Object value)
type
- The element type used as prefix for the event (e.g. use 'goal' for 'goal_added' events).value
- The element value (must be transferable).public void elementRemoved(java.lang.String type, java.lang.Object value)
type
- The element type used as prefix for the event (e.g. use 'goal' for 'goal_removed' events).value
- The element value (must be transferable).public void elementChanged(java.lang.String type, java.lang.Object value)
type
- The element type used as prefix for the event (e.g. use 'goal' for 'goal_changed' events).value
- The element value (must be transferable).public void occurrenceAppeared(java.lang.String type, java.lang.Object value)
type
- The occurrence type used as prefix for the event (e.g. use 'step' for 'step_occurred' events).value
- The occurrence value (must be transferable).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
protected void dispose()