Interface Listenable

    • Method Detail

      • addListener

        void addListener​(Object listener)
        Adds a listener to the component. Typically, listeners would need to be annotated with Listener and further to that, contain methods annotated appropriately, otherwise the listener will not be registered.

        See the Listener annotation for more information.

        Parameters:
        listener - must not be null.
      • removeListener

        void removeListener​(Object listener)
        Removes a listener from the component.
        Parameters:
        listener - listener to remove. Must not be null.
        Throws:
        IllegalLifecycleStateException - may be thrown if the Listenable is stopped.
      • getListeners

        Set<Object> getListeners()
        Returns:
        a set of all listeners registered on this component.