Package net.engio.mbassy.subscription
Class Subscription.Handle
java.lang.Object
net.engio.mbassy.subscription.Subscription.Handle
- Enclosing class:
Subscription
A handle exposes specific functionality of a subscription to be used by clients.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
onSubscription
(Runnable handler) Add a runnable that is invoked after a new listener is subscribed to the corresponding subscription.
-
Constructor Details
-
Handle
public Handle()
-
-
Method Details
-
onSubscription
Add a runnable that is invoked after a new listener is subscribed to the corresponding subscription. The runnable does not receive any information on the event to prevent clients from untroducing coupling between senders/receivers.- Parameters:
handler
- The code to be run after each subscription
-