Object
XObservable<T>
Allows you to register to the objects which will send you notification once something has
changed. Performs single threaded simple notification.
Java deprecated Observable since Java 9. The alternatives they propose are:
- javabeans - requires you to add dependency on java.desktop
- flow - requires you to define onComplete and others
- java.util.concurrent - for messaging between the threads
Which may be not exactly what you need if you are looking for simple notification in non GUI application.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(Consumer<T> listener) void
removeListener
(Consumer<T> listener) void
-
Constructor Details
-
XObservable
public XObservable()
-
-
Method Details
-
addListener
-
removeListener
-
updateAll
-