Interface ListenerRepository

    • Method Detail

      • addListener

        void addListener​(Listener listener)
        Adds a listener to the repository.
        Parameters:
        listener - - the listener
      • findListeners

        List<Listener> findListeners​(String url)
        Searches for listeners corresponding to the given url. This is a hierarchical search, starting from top (/url/foo/bar) to bottom (/url).
        Parameters:
        url - url
        Returns:
        List with listeners for the url, can be empty if no listeners are found.
      • findListeners

        List<Listener> findListeners​(String url,
                                     String method,
                                     io.vertx.core.MultiMap headers)
        Searches for listeners corresponding to the given url, used http method and request headers. This is a hierarchical search, starting from top (/url/foo/bar) to bottom (/url).
        Parameters:
        url - url
        method - http method
        headers - http headers
        Returns:
        List with listeners for the url, can be empty if no listeners are found.
      • removeListener

        void removeListener​(String listenerId)
        Removes the listener for the given listenerId.
        Parameters:
        listenerId - listenerId
      • size

        int size()
        Returns the size of the repository. If the repository is empty, it will return 0.
        Returns:
        size
      • isEmpty

        boolean isEmpty()
        Returns whether the repository is empty or not.
        Returns:
        true if repository is empty.
      • getListeners

        List<Listener> getListeners()
        Returns a copy of all registered listeners.
        Returns:
        a copy of all registered listeners