Interface Subscription
- All Superinterfaces:
AutoCloseable
The handle of a listener subscribed to an
EventBus.
Closing it, for instance through try-with-resources, unsubscribes the listener.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Unsubscribes the listener, exactly likeunsubscribe().booleanisActive()Returnstrueuntil the listener is unsubscribed.voidUnsubscribes the listener.
-
Method Details
-
isActive
boolean isActive()Returnstrueuntil the listener is unsubscribed.- Returns:
trueuntil the listener is unsubscribed- Since:
- 0.1.0
-
unsubscribe
void unsubscribe()Unsubscribes the listener. Calling it again does nothing.- Since:
- 0.1.0
-
close
default void close()Unsubscribes the listener, exactly likeunsubscribe().- Specified by:
closein interfaceAutoCloseable- Since:
- 0.1.0
-