com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.lifecycle
Class GerritEventLifecycle

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.lifecycle.GerritEventLifecycle
Direct Known Subclasses:
GerritTriggeredEvent

public abstract class GerritEventLifecycle
extends Object

Adaptor class for handling event listeners for the lifecycle of a GerritEvent.

Author:
Robert Sandell <robert.sandell@sonyericsson.com>

Constructor Summary
GerritEventLifecycle()
           
 
Method Summary
 void addListener(GerritEventLifecycleListener listener)
          Adds the listener to the list of listeners.
 void fireAllBuildsCompleted()
          Fires the event GerritEventLifecycleListener.allBuildsCompleted(PatchsetCreated).
 void fireBuildCompleted(hudson.model.AbstractBuild build)
          Fires the event GerritEventLifecycleListener.buildCompleted(PatchsetCreated, AbstractBuild).
 void fireBuildStarted(hudson.model.AbstractBuild build)
          Fires the event GerritEventLifecycleListener.buildStarted(PatchsetCreated, AbstractBuild).
 void fireProjectTriggered(hudson.model.AbstractProject project)
          Fires the event GerritEventLifecycleListener.projectTriggered(PatchsetCreated, AbstractProject).
 void fireTriggerScanDone()
          Fires the event GerritEventLifecycleListener.triggerScanDone(PatchsetCreated).
 void fireTriggerScanStarting()
          Fires the event GerritEventLifecycleListener.triggerScanStarting(PatchsetCreated).
protected  List<GerritEventLifecycleListener> getListeners()
          Gets a copy of the internal transient list of listeners.
 boolean removeListener(GerritEventLifecycleListener listener)
          Removes the listener from the list of listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GerritEventLifecycle

public GerritEventLifecycle()
Method Detail

addListener

public void addListener(GerritEventLifecycleListener listener)
Adds the listener to the list of listeners.

Parameters:
listener - the listener to add.

removeListener

public boolean removeListener(GerritEventLifecycleListener listener)
Removes the listener from the list of listeners.

Parameters:
listener - the listener to remove.
Returns:
true if it was removed.
See Also:
List.remove(java.lang.Object)

fireTriggerScanStarting

public void fireTriggerScanStarting()
Fires the event GerritEventLifecycleListener.triggerScanStarting(PatchsetCreated).


fireTriggerScanDone

public void fireTriggerScanDone()
Fires the event GerritEventLifecycleListener.triggerScanDone(PatchsetCreated).


fireProjectTriggered

public void fireProjectTriggered(hudson.model.AbstractProject project)
Fires the event GerritEventLifecycleListener.projectTriggered(PatchsetCreated, AbstractProject).

Parameters:
project - the project that is triggered.

fireBuildStarted

public void fireBuildStarted(hudson.model.AbstractBuild build)
Fires the event GerritEventLifecycleListener.buildStarted(PatchsetCreated, AbstractBuild).

Parameters:
build - the build that has started.

fireBuildCompleted

public void fireBuildCompleted(hudson.model.AbstractBuild build)
Fires the event GerritEventLifecycleListener.buildCompleted(PatchsetCreated, AbstractBuild).

Parameters:
build - the build that is completed.

fireAllBuildsCompleted

public void fireAllBuildsCompleted()
Fires the event GerritEventLifecycleListener.allBuildsCompleted(PatchsetCreated).


getListeners

protected List<GerritEventLifecycleListener> getListeners()
Gets a copy of the internal transient list of listeners.

Returns:
the copy of the list of listeners, or null if the origin list is null.


Copyright © 2004-2012 Hudson. All Rights Reserved.