public class NotificationFactory extends Object
Constructor and Description |
---|
NotificationFactory() |
Modifier and Type | Method and Description |
---|---|
GerritNotifier |
createGerritNotifier(com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner,
String serverName)
Factory method for creating a GerritNotifier.
|
GerritNotifier |
createGerritNotifier(IGerritHudsonTriggerConfig config,
com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner)
Factory method for creating a GerritNotifier.
|
IGerritHudsonTriggerConfig |
getConfig(String serverName)
Shortcut method to get the config from
GerritServer . |
static NotificationFactory |
getInstance()
Gets the singleton instance of the NotificationFactory.
|
void |
queueBuildCompleted(BuildMemory.MemoryImprint memoryImprint,
hudson.model.TaskListener listener)
Queues a build completed command on the send-command queue.
|
void |
queueBuildStarted(hudson.model.Run build,
hudson.model.TaskListener listener,
com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
BuildsStartedStats stats)
Queues a build started command on the send-command queue.
|
public static NotificationFactory getInstance()
public IGerritHudsonTriggerConfig getConfig(String serverName)
GerritServer
.serverName
- the name of the server.public GerritNotifier createGerritNotifier(com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner, String serverName)
cmdRunner
- - something capable of sending commands to Gerrit.serverName
- the name of the server.public GerritNotifier createGerritNotifier(IGerritHudsonTriggerConfig config, com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner)
config
- - a configuration to use for parameter expansion.cmdRunner
- - something capable of sending commands to Gerrit.public void queueBuildCompleted(BuildMemory.MemoryImprint memoryImprint, hudson.model.TaskListener listener)
memoryImprint
- the memory of the builds.listener
- a listener.GerritSendCommandQueue.queue(com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob)
,
BuildCompletedCommandJob
public void queueBuildStarted(hudson.model.Run build, hudson.model.TaskListener listener, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, BuildsStartedStats stats)
build
- the build.listener
- a listener.event
- the event.stats
- the started stats.GerritSendCommandQueue.queue(com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob)
,
BuildStartedCommandJob
Copyright © 2004-2015. All Rights Reserved.