public class InitDelayingTopologyEventListener extends Object implements TopologyEventListener
What happens aFter the startup time depends on what was received during the delay:
| Constructor and Description |
|---|
InitDelayingTopologyEventListener(long startupDelay,
TopologyEventListener delegate,
Scheduler scheduler)
Creates a new init-delaying listener with the given delay, delegate and scheduler.
|
InitDelayingTopologyEventListener(long startupDelay,
TopologyEventListener delegate,
Scheduler scheduler,
org.slf4j.Logger loggerOrNull)
Creates a new init-delaying listener with the given delay, delegate, scheduler and optinoal logger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Marks this listener as no longer active - ensures that it doesn't call the delegate
via any potentially pending scheduler callback.
|
void |
handleTopologyEvent(TopologyEvent event)
Inform the service about an event in the topology - or in the discovery
of the topology.
|
public InitDelayingTopologyEventListener(long startupDelay,
TopologyEventListener delegate,
Scheduler scheduler)
For properly disposing the caller should use the dispose method!
dispose()public InitDelayingTopologyEventListener(long startupDelay,
TopologyEventListener delegate,
Scheduler scheduler,
org.slf4j.Logger loggerOrNull)
For properly disposing the caller should use the dispose method!
dispose()public void handleTopologyEvent(TopologyEvent event)
TopologyEventListener
The TopologyEvent contains details about what changed.
The supported event types are:
TOPOLOGY_INIT sent when the TopologyEventListener
was first bound to the discovery service - represents the initial state
of the topology at that time.TOPOLOGY_CHANGING sent when the discovery service
discovered a change in the topology and has started to settle the change.
This event is sent before TOPOLOGY_CHANGED but is optionalTOPOLOGY_CHANGED sent when the discovery service
discovered a change in the topology and has settled it.PROPERTIES_CHANGED sent when the one or many properties
have changed in an instance in the current topologyhandleTopologyEvent in interface TopologyEventListenerevent - The topology eventpublic void dispose()
Note that after dispose you can *still* call handleTopologyEvent and the events are passed to the delegate - but those are expected to be 'late' events and not really part of the normal game. Hence, the caller must also ensure that the handleTopologyEvent method isn't called anymore (which typically is automatically guaranteed since the caller is typically an osgi service that gets unregistered anyway)
"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"