Class JenkinsAwareGerritHandler
- java.lang.Object
-
- com.sonymobile.tools.gerrit.gerritevents.GerritHandler
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.JenkinsAwareGerritHandler
-
- All Implemented Interfaces:
com.sonymobile.tools.gerrit.gerritevents.Handler
,com.sonymobile.tools.gerrit.gerritevents.workers.Coordinator
public class JenkinsAwareGerritHandler extends com.sonymobile.tools.gerrit.gerritevents.GerritHandler
Specialization of GerritHandler that supports gerrit event's lifecycle and takes care of custom EventThread creation.- Author:
- Hugo Arès <hugo.ares@ericsson.com>
-
-
Constructor Summary
Constructors Constructor Description JenkinsAwareGerritHandler(int numberOfWorkerThreads)
Standard Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.sonymobile.tools.gerrit.gerritevents.workers.EventThread
createEventThread(String threadName)
Here we override the EventThread creation with one that impersonates System.void
notifyListeners(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
-
Methods inherited from class com.sonymobile.tools.gerrit.gerritevents.GerritHandler
addEventListeners, addEventListeners, addListener, getEventListenersCount, getGerritEventListenersView, getIgnoreEMail, getNumberOfWorkerThreads, getQueueSize, getThreadFactory, getThreadKeepAliveTime, getWhitelist, getWorkQueue, post, post, post, post, post, removeAllEventListeners, removeListener, scheduleGerritWhitelistRead, scheduleGerritWhitelistRead, setIgnoreEMail, setNumberOfWorkerThreads, setThreadKeepAliveTime, shutdown, startQueue, triggerEvent
-
-
-
-
Method Detail
-
createEventThread
protected com.sonymobile.tools.gerrit.gerritevents.workers.EventThread createEventThread(String threadName)
Here we override the EventThread creation with one that impersonates System.- Overrides:
createEventThread
in classcom.sonymobile.tools.gerrit.gerritevents.GerritHandler
- Parameters:
threadName
- name of thread.- Returns:
- new EventThread.
-
notifyListeners
public void notifyListeners(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
- Specified by:
notifyListeners
in interfacecom.sonymobile.tools.gerrit.gerritevents.workers.Coordinator
- Overrides:
notifyListeners
in classcom.sonymobile.tools.gerrit.gerritevents.GerritHandler
-
-