Class Subscription.Handle

  • Enclosing class:
    Subscription

    public class Subscription.Handle
    extends java.lang.Object
    A handle exposes specific functionality of a subscription to be used by clients.
    • Constructor Summary

      Constructors 
      Constructor Description
      Handle()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void onSubscription​(java.lang.Runnable handler)
      Add a runnable that is invoked after a new listener is subscribed to the corresponding subscription.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Handle

        public Handle()
    • Method Detail

      • onSubscription

        void onSubscription​(java.lang.Runnable handler)
        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