Interface Subscription


public interface Subscription
Represents a registration for receiving events from a subscribe operation. Provides a way to clean up and remove a subscription when it is no longer needed.

Example usage:

 
 Subscription s = pathObject.subscribe(event -> { ... });
 // Later, when done with the subscription
 s.unsubscribe();
 
 

Spec: SUB1

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deregisters the listener that was registered by the corresponding subscribe call.
  • Method Details

    • unsubscribe

      void unsubscribe()
      Deregisters the listener that was registered by the corresponding subscribe call. Once called, the listener will not be invoked for any subsequent events and references to it are cleaned up. Calling this method more than once is a no-op.

      Spec: SUB2a, SUB2b