Class SCMNavigatorEvent<P>

  • Type Parameters:
    P - the (provider specific) payload.

    public abstract class SCMNavigatorEvent<P>
    extends SCMEvent<P>
    Base class for events relating to SCMNavigator instances.
    Since:
    2.0
    • Constructor Detail

      • SCMNavigatorEvent

        @Deprecated
        public SCMNavigatorEvent​(@NonNull
                                 SCMEvent.Type type,
                                 long timestamp,
                                 @NonNull
                                 P payload)
        Deprecated.
      • SCMNavigatorEvent

        public SCMNavigatorEvent​(@NonNull
                                 SCMEvent.Type type,
                                 long timestamp,
                                 @NonNull
                                 P payload,
                                 @CheckForNull
                                 String origin)
      • SCMNavigatorEvent

        public SCMNavigatorEvent​(@NonNull
                                 SCMEvent.Type type,
                                 @NonNull
                                 P payload,
                                 @CheckForNull
                                 String origin)
    • Method Detail

      • isMatch

        public abstract boolean isMatch​(SCMNavigator navigator)
        Tests if this event applies to the supplied SCMNavigator.
        Parameters:
        navigator - the SCMNavigator.
        Returns:
        true if and only if this event concerns the supplied SCMNavigator.
      • descriptionFor

        @CheckForNull
        public String descriptionFor​(SCMNavigator navigator)
        Return a description of the event in the context of the supplied SCMNavigator.
        Parameters:
        navigator - the SCMNavigator, the navigator must be isMatch(SCMNavigator).
        Returns:
        the description or null if no description can be provided.
        Since:
        2.1.1
      • fireLater

        public static void fireLater​(@NonNull
                                     SCMNavigatorEvent<?> event,
                                     long delay,
                                     TimeUnit delayUnits)
        Fires the SCMNavigatorEvent to all registered SCMEventListener instances after the specified delay.
        Parameters:
        event - the event to fire.
        delay - how long to wait before firing the event.
        delayUnits - the units of time in which the delay is expressed.