|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.listeners.RunListener<R>
public abstract class RunListener<R extends Run>
Receives notifications about builds.
Listener is always Hudson-wide, so once registered it gets notifications for every build that happens in this Hudson.
This is an abstract class so that methods added in the future won't break existing listeners.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
static CopyOnWriteList<RunListener> |
LISTENERS
Deprecated. as of 1.281 Use all() for read access, and use
Extension for registration. |
Class<R> |
targetType
|
| Method Summary | |
|---|---|
static ExtensionList<RunListener> |
all()
Returns all the registered RunListener descriptors. |
static void |
fireCompleted(Run r,
TaskListener listener)
Fires the onCompleted(R, hudson.model.TaskListener) event. |
static void |
fireDeleted(Run r)
Fires the onFinalized(Run) event. |
static void |
fireFinalized(Run r)
Fires the onFinalized(Run) event. |
static void |
fireStarted(Run r,
TaskListener listener)
Fires the onStarted(R, hudson.model.TaskListener) event. |
Class<R> |
getTargetType()
|
void |
onCompleted(R r,
TaskListener listener)
Called after a build is completed. |
void |
onDeleted(R r)
Called right before a build is going to be deleted. |
void |
onFinalized(R r)
Called after a build is moved to the Run.State#COMPLETED state. |
void |
onStarted(R r,
TaskListener listener)
Called when a build is started (i.e. |
void |
register()
Deprecated. as of 1.281 Put Extension on your class to get it
auto-registered. |
void |
unregister()
Reverse operation of register(). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Class<R extends Run> targetType
public static final CopyOnWriteList<RunListener> LISTENERS
all() for read access, and use
Extension for registration.
| Method Detail |
|---|
public Class<R> getTargetType()
public void onCompleted(R r,
TaskListener listener)
r - The completed build.listener - The listener for this build. This can be used to produce
log messages, for example, which becomes a part of the "console output"
of this build. But when this method runs, the build is considered
completed, so its status cannot be changed anymore.public void onFinalized(R r)
Run.State#COMPLETED state.
At this point, all the records related to a build is written down to
the disk. As such, TaskListener is no longer available. This
happens later than onCompleted(Run, TaskListener).
public void onStarted(R r,
TaskListener listener)
r - The started build.listener - The listener for this build. This can be used to produce
log messages, for example, which becomes a part of the "console output"
of this build.public void onDeleted(R r)
r - The build.public void register()
Extension on your class to get it
auto-registered.
public void unregister()
register().
public static void fireCompleted(Run r,
TaskListener listener)
onCompleted(R, hudson.model.TaskListener) event.
public static void fireStarted(Run r,
TaskListener listener)
onStarted(R, hudson.model.TaskListener) event.
public static void fireFinalized(Run r)
onFinalized(Run) event.
public static void fireDeleted(Run r)
onFinalized(Run) event.
public static ExtensionList<RunListener> all()
RunListener descriptors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||