Class MQDataProvider
- java.lang.Object
-
- com.sonymobile.jenkins.plugins.mq.mqnotifier.providers.MQDataProvider
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
CauseProvider,ParameterProvider
public abstract class MQDataProvider extends Object implements ExtensionPoint
Provides data for the notifier to send.- Author:
- Tomas Westling <tomas.westling@axis.com>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description MQDataProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<MQDataProvider>all()Returns all MQDataProvider for this Jenkins instance.voidprovideCompletedRunData(Run run, net.sf.json.JSONObject json)Provides data for when a Run is completed.voidprovideEnterWaitingQueueData(Queue.WaitingItem wi, net.sf.json.JSONObject json)Provides data for when an item enters the queue.voidprovideLeftQueueData(Queue.LeftItem li, net.sf.json.JSONObject json)Provides data for when an item leaves the queue.voidprovideStartRunData(Run run, net.sf.json.JSONObject json)Provides data for when a Run starts.voidprovideTaskAcceptedData(Executor executor, Queue.Task task, net.sf.json.JSONObject json)Provides data for when a task is accepted.voidprovideTaskCompletedData(Executor executor, Queue.Task task, long durationMS, net.sf.json.JSONObject json)Provides data for when a task is completed.voidprovideTaskCompletedWithProblemsData(Executor executor, Queue.Task task, long durationMS, Throwable problems, net.sf.json.JSONObject json)Provides data for when a task is completed with problems.voidprovideTaskStartedData(Executor executor, Queue.Task task, net.sf.json.JSONObject json)Provides data for when a task is started.
-
-
-
Method Detail
-
provideEnterWaitingQueueData
public void provideEnterWaitingQueueData(Queue.WaitingItem wi, net.sf.json.JSONObject json)
Provides data for when an item enters the queue.- Parameters:
wi- theQueue.WaitingItemthat has entered the queue.json- the json object that we should add information to.
-
provideLeftQueueData
public void provideLeftQueueData(Queue.LeftItem li, net.sf.json.JSONObject json)
Provides data for when an item leaves the queue.- Parameters:
li- theQueue.LeftItemthat has left the queue.json- the json object that we should add information to.
-
provideStartRunData
public void provideStartRunData(Run run, net.sf.json.JSONObject json)
Provides data for when a Run starts.- Parameters:
run- theRunthat has started running.json- the json object that we should add information to.
-
provideCompletedRunData
public void provideCompletedRunData(Run run, net.sf.json.JSONObject json)
Provides data for when a Run is completed.- Parameters:
run- theRunthat has completed running.json- the json object that we should add information to.
-
provideTaskAcceptedData
public void provideTaskAcceptedData(Executor executor, Queue.Task task, net.sf.json.JSONObject json)
Provides data for when a task is accepted.- Parameters:
executor- The executor.task- The task.json- the json object that we should add information to.
-
provideTaskStartedData
public void provideTaskStartedData(Executor executor, Queue.Task task, net.sf.json.JSONObject json)
Provides data for when a task is started.- Parameters:
executor- The executor.task- The task.json- the json object that we should add information to.
-
provideTaskCompletedData
public void provideTaskCompletedData(Executor executor, Queue.Task task, long durationMS, net.sf.json.JSONObject json)
Provides data for when a task is completed.- Parameters:
executor- The executor.task- The task.durationMS- The number of milliseconds that the task took to complete.json- the json object that we should add information to.
-
provideTaskCompletedWithProblemsData
public void provideTaskCompletedWithProblemsData(Executor executor, Queue.Task task, long durationMS, Throwable problems, net.sf.json.JSONObject json)
Provides data for when a task is completed with problems.- Parameters:
executor- The executor.task- The task.durationMS- The number of milliseconds that the task took to complete.problems- The exception that was thrown.json- the json object that we should add information to.
-
all
public static List<MQDataProvider> all()
Returns all MQDataProvider for this Jenkins instance.- Returns:
- all the MQDataProviders.
-
-