|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.NotificationFactory
public class NotificationFactory
A factory for creating notification entities. This factory is mainly created and used to ease unit testing.
Constructor Summary | |
---|---|
NotificationFactory()
|
Method Summary | |
---|---|
GerritNotifier |
createGerritNotifier(GerritCmdRunner cmdRunner,
String serverName)
Factory method for creating a GerritNotifier. |
GerritNotifier |
createGerritNotifier(IGerritHudsonTriggerConfig config,
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.AbstractBuild build,
hudson.model.TaskListener listener,
GerritTriggeredEvent event,
BuildsStartedStats stats)
Queues a build started command on the send-command queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotificationFactory()
Method Detail |
---|
public static NotificationFactory getInstance()
public IGerritHudsonTriggerConfig getConfig(String serverName)
GerritServer
.
serverName
- the name of the server.
public GerritNotifier createGerritNotifier(GerritCmdRunner cmdRunner, String serverName)
cmdRunner
- - something capable of sending commands to Gerrit.serverName
- the name of the server.
public GerritNotifier createGerritNotifier(IGerritHudsonTriggerConfig config, 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.sonyericsson.hudson.plugins.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob)
,
BuildCompletedCommandJob
public void queueBuildStarted(hudson.model.AbstractBuild build, hudson.model.TaskListener listener, GerritTriggeredEvent event, BuildsStartedStats stats)
build
- the build.listener
- a listener.event
- the event.stats
- the started stats.GerritSendCommandQueue.queue(com.sonyericsson.hudson.plugins.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob)
,
BuildStartedCommandJob
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |