Package com.powsybl.afs.storage
Class InMemoryEventsBus
- java.lang.Object
-
- com.powsybl.afs.storage.InMemoryEventsBus
-
- All Implemented Interfaces:
EventsBus
,AutoCloseable
public class InMemoryEventsBus extends Object implements EventsBus
- Author:
- Chamseddine Benhamed
-
-
Constructor Summary
Constructors Constructor Description InMemoryEventsBus()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(AppStorageListener l)
Add a listener to the EventsBus.void
flush()
Flush any changes to underlying EventsBus.void
pushEvent(NodeEvent event, String topic)
Add a new event to the event busvoid
removeListener(AppStorageListener l)
remove a listener from the EventsBus.void
removeListeners()
Remove all listeners from the EventsBus.
-
-
-
Method Detail
-
pushEvent
public void pushEvent(NodeEvent event, String topic)
Description copied from interface:EventsBus
Add a new event to the event bus
-
flush
public void flush()
Description copied from interface:EventsBus
Flush any changes to underlying EventsBus.
-
addListener
public void addListener(AppStorageListener l)
Description copied from interface:EventsBus
Add a listener to the EventsBus.- Specified by:
addListener
in interfaceEventsBus
-
removeListener
public void removeListener(AppStorageListener l)
Description copied from interface:EventsBus
remove a listener from the EventsBus.- Specified by:
removeListener
in interfaceEventsBus
-
removeListeners
public void removeListeners()
Description copied from interface:EventsBus
Remove all listeners from the EventsBus.- Specified by:
removeListeners
in interfaceEventsBus
-
-