Interface GerritEventLifecycle
- All Known Implementing Classes:
ManualPatchsetCreated
public interface GerritEventLifecycle
Interface representing a class handling event listeners for the lifecycle of a GerritEvent.
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>, Hugo Arès <hugo.ares@ericsson.com>
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(GerritEventLifecycleListener listener) Adds the listener to the list of listeners.voidFires the eventGerritEventLifecycleListener.allBuildsCompleted(GerritEvent).voidfireBuildCompleted(Run<?, ?> build) Fires the eventGerritEventLifecycleListener.buildCompleted(GerritEvent, Run).voidfireBuildStarted(Run<?, ?> build) Fires the eventGerritEventLifecycleListener.buildStarted(GerritEvent, Run).voidfireProjectTriggered(Job<?, ?> project) Fires the eventGerritEventLifecycleListener.projectTriggered(GerritEvent, Job).voidFires the eventGerritEventLifecycleListener.triggerScanDone(GerritEvent).voidFires the eventGerritEventLifecycleListener.triggerScanStarting(GerritEvent).com.sonymobile.tools.gerrit.gerritevents.dto.GerritEventgetEvent()The event associated with the lifecycle.booleanremoveListener(GerritEventLifecycleListener listener) Removes the listener from the list of listeners.
-
Method Details
-
getEvent
com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent getEvent()The event associated with the lifecycle.- Returns:
- The event
-
addListener
Adds the listener to the list of listeners.- Parameters:
listener- the listener to add.
-
removeListener
Removes the listener from the list of listeners.- Parameters:
listener- the listener to remove.- Returns:
- true if it was removed.
- See Also:
-
fireTriggerScanStarting
void fireTriggerScanStarting()Fires the eventGerritEventLifecycleListener.triggerScanStarting(GerritEvent). -
fireTriggerScanDone
void fireTriggerScanDone()Fires the eventGerritEventLifecycleListener.triggerScanDone(GerritEvent). -
fireProjectTriggered
Fires the eventGerritEventLifecycleListener.projectTriggered(GerritEvent, Job).- Parameters:
project- the project that is triggered.
-
fireBuildStarted
Fires the eventGerritEventLifecycleListener.buildStarted(GerritEvent, Run).- Parameters:
build- the build that has started.
-
fireBuildCompleted
Fires the eventGerritEventLifecycleListener.buildCompleted(GerritEvent, Run).- Parameters:
build- the build that is completed.
-
fireAllBuildsCompleted
void fireAllBuildsCompleted()Fires the eventGerritEventLifecycleListener.allBuildsCompleted(GerritEvent).
-