Class MetaErrorListeners


  • @Weight(NORMAL)
    public final class MetaErrorListeners
    extends java.lang.Object
    Service containing all error listeners for the common module methods and providing their notifications.
    Since:
    1.0
    • Field Detail

      • ERROR_LISTENERS

        private static final java.util.List<MetaErrorListener> ERROR_LISTENERS
    • Constructor Detail

      • MetaErrorListeners

        private MetaErrorListeners()
    • Method Detail

      • clear

        public static void clear()
        Remove all listeners.
        Since:
        1.0
      • addErrorListener

        public static void addErrorListener​(MetaErrorListener value)
        Add new fireError listener for global fireError events.
        Parameters:
        value - listener to be added
        Since:
        1.0
      • removeErrorListener

        public static void removeErrorListener​(MetaErrorListener value)
        Remove listener.
        Parameters:
        value - listener to be removed
        Since:
        1.0
      • hasListeners

        public static boolean hasListeners()
        Check that there are registered listeners.
        Returns:
        true if presented listeners for global fireError events, false otherwise
        Since:
        1.0
      • fireError

        @Weight(VARIABLE)
        public static void fireError​(java.lang.String text,
                                     java.lang.Throwable error)
        Send notifications to all listeners.
        Parameters:
        text - message text
        error - error object
        Since:
        1.0