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.void
provideCompletedRunData(Run run, net.sf.json.JSONObject json)
Provides data for when a Run is completed.void
provideEnterWaitingQueueData(Queue.WaitingItem wi, net.sf.json.JSONObject json)
Provides data for when an item enters the queue.void
provideLeftQueueData(Queue.LeftItem li, net.sf.json.JSONObject json)
Provides data for when an item leaves the queue.void
provideStartRunData(Run run, net.sf.json.JSONObject json)
Provides data for when a Run starts.void
provideTaskAcceptedData(Executor executor, Queue.Task task, net.sf.json.JSONObject json)
Provides data for when a task is accepted.void
provideTaskCompletedData(Executor executor, Queue.Task task, long durationMS, net.sf.json.JSONObject json)
Provides data for when a task is completed.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.void
provideTaskStartedData(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.WaitingItem
that 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.LeftItem
that 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
- theRun
that 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
- theRun
that 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.
-
-