Class NotificationEventAdapter
- java.lang.Object
-
- jetbrains.buildServer.serverSide.ProjectsModelListenerAdapter
-
- jetbrains.buildServer.serverSide.BuildServerAdapter
-
- jetbrains.buildServer.notification.NotificationEventAdapter
-
- All Implemented Interfaces:
EventListener,BuildServerListener,ProjectsModelListener,ServerListener
public class NotificationEventAdapter extends BuildServerAdapter
Translates events of build server to NotificationEventListener events which are more convenient for notificators.- Author:
- Pavel.Sher Date: 01.11.2006
-
-
Constructor Summary
Constructors Constructor Description NotificationEventAdapter(EventDispatcher<BuildServerListener> events, ExecutorServices executors, BuildsManager buildsManager, NotificationEventListener eventAccumulator, TestName2Index testName2Index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildChangedStatus(SRunningBuild runningBuild, Status oldStatus, Status newStatus)Called when build status changes from successful to failedvoidbuildFinished(SRunningBuild build)Called after build finishing, only if build was not interruptedvoidbuildInterrupted(SRunningBuild build)Called after build finishing, only if build was interruptedvoidbuildProblemsMuted(MuteInfo muteInfo)Called when a set of build problems are muted (with same mute properties).voidbuildProblemsUnmuted(SUser user, Map<MuteInfo,Collection<BuildProblemInfo>> unmutedGroups)Called when a set of build problems are unmuted.voidchangesLoaded(SRunningBuild build)Called when changes for a newly started build have been loaded successfully.voidentryCreated(SFinishedBuild build)Called when build is added to the history.voidhandleFinishedBuild(SRunningBuild build)voidlabelingFailed(SBuild build, VcsRoot root, Throwable exception)Labeling process failed for the specified build and root with the specified problem.voidresponsibleChanged(SBuildType bt, ResponsibilityEntry oldValue, ResponsibilityEntry newValue)Called when build configuration responsible has changed, or responsibility status has changed
Some events may be omitted when the responsibility was changed on another node, i.e.voidresponsibleChanged(SProject project, Collection<BuildProblemInfo> buildProblems, ResponsibilityEntry entry)Called when responsibility for several build problems at once is changed.voidresponsibleChanged(SProject project, Collection<TestName> testNames, ResponsibilityEntry entry, boolean isUserAction)Called when responsibility for several tests at once is changed.voidserverShutdown()Called when server shutdown has been started.voidserverStartup()Called when server has been started and its configuration has been loaded from the diskvoidsetBuildFailingDelay(int newDelayMillis)voidsetCheckHangedBuildsInterval(int checkHangedBuildsInterval)voidtestsMuted(MuteInfo muteInfo)Called when a set of tests are muted (with same mute properties).voidtestsUnmuted(SUser user, Map<MuteInfo,Collection<STest>> unmutedGroups)Called when several of tests have been unmuted.-
Methods inherited from class jetbrains.buildServer.serverSide.BuildServerAdapter
agentDescriptionUpdated, agentRegistered, agentRemoved, agentRemoved, agentsDescriptionUpdated, agentStatusChanged, agentUnregistered, agentUnregistered, beforeAgentUnregistered, beforeBuildFinish, beforeEntryDelete, beforeServerConfigurationLoaded, buildArtifactsChanged, buildCommented, buildDetachedFromAgent, buildPinned, buildProblemsChanged, buildPromotionTagsChanged, buildQueueOrderChanged, buildRemovedFromQueue, buildStarted, buildTagsChanged, buildTagsChanged, buildTypeAddedToQueue, buildTypeAddedToQueue, buildUnpinned, changeAdded, changesLoaded, cleanupFinished, cleanupStarted, entriesDeleted, entryDeleted, labelingSucceed, messageReceived, pluginsLoaded, responsibleChanged, responsibleRemoved, responsibleRemoved, serverConfigurationReloaded, serverShutdownComplete, sourcesVersionReleased, sourcesVersionReleased, sourcesVersionReleased, statisticValuePublished
-
Methods inherited from class jetbrains.buildServer.serverSide.ProjectsModelListenerAdapter
beforeBuildTypeDeleted, beforeBuildTypesDeleted, buildTypeActiveStatusChanged, buildTypeDeleted, buildTypeDescriptionUpdated, buildTypeExternalIdChanged, buildTypeMoved, buildTypePersisted, buildTypeRegistered, buildTypeRenamed, buildTypeTemplateDeleted, buildTypeTemplateDeleted, buildTypeTemplateExternalIdChanged, buildTypeTemplateMoved, buildTypeTemplatePersisted, buildTypeTemplateRestored, buildTypeUnregistered, projectArchived, projectCreated, projectDearchived, projectDescriptionUpdated, projectExternalIdChanged, projectFeatureAdded, projectFeatureChanged, projectFeatureRemoved, projectMoved, projectPersisted, projectPluginDataFileRemoved, projectPluginDataFileSaved, projectRemoved, projectRemoved, projectRenamed, projectRestored, vcsRootExternalIdChanged, vcsRootMoved, vcsRootPersisted, vcsRootRemoved, vcsRootsPersisted, vcsRootUpdated
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.ProjectsModelListener
beforeBuildTypeDeleted, beforeBuildTypesDeleted, buildTypeActiveStatusChanged, buildTypeDeleted, buildTypeDescriptionUpdated, buildTypeExternalIdChanged, buildTypeMoved, buildTypePersisted, buildTypeRegistered, buildTypeRenamed, buildTypeTemplateDeleted, buildTypeTemplateDeleted, buildTypeTemplateExternalIdChanged, buildTypeTemplateMoved, buildTypeTemplatePersisted, buildTypeTemplateRestored, buildTypeUnregistered, projectArchived, projectCreated, projectDearchived, projectDescriptionUpdated, projectExternalIdChanged, projectFeatureAdded, projectFeatureChanged, projectFeatureRemoved, projectMoved, projectPersisted, projectPluginDataFileRemoved, projectPluginDataFileSaved, projectRemoved, projectRemoved, projectRenamed, projectRestored, vcsRootExternalIdChanged, vcsRootMoved, vcsRootPersisted, vcsRootRemoved, vcsRootsPersisted, vcsRootUpdated
-
-
-
-
Constructor Detail
-
NotificationEventAdapter
public NotificationEventAdapter(@NotNull EventDispatcher<BuildServerListener> events, @NotNull ExecutorServices executors, @NotNull BuildsManager buildsManager, @NotNull NotificationEventListener eventAccumulator, @NotNull TestName2Index testName2Index)
-
-
Method Detail
-
setCheckHangedBuildsInterval
public void setCheckHangedBuildsInterval(int checkHangedBuildsInterval)
-
setBuildFailingDelay
public void setBuildFailingDelay(int newDelayMillis)
-
serverStartup
public void serverStartup()
Description copied from interface:ServerListenerCalled when server has been started and its configuration has been loaded from the disk- Specified by:
serverStartupin interfaceServerListener- Overrides:
serverStartupin classBuildServerAdapter
-
changesLoaded
public void changesLoaded(@NotNull SRunningBuild build)Description copied from interface:BuildServerListenerCalled when changes for a newly started build have been loaded successfully. This event is always sent after the buildStarted. If the build changes were collected while the build was sitting in the queue, then this even will still be sent after the build starts. The method is not called if checking for changes operation failed.- Specified by:
changesLoadedin interfaceBuildServerListener- Overrides:
changesLoadedin classBuildServerAdapter- Parameters:
build- build, whose changes are loaded
-
buildChangedStatus
public void buildChangedStatus(@NotNull SRunningBuild runningBuild, Status oldStatus, Status newStatus)Description copied from interface:BuildServerListenerCalled when build status changes from successful to failed- Specified by:
buildChangedStatusin interfaceBuildServerListener- Overrides:
buildChangedStatusin classBuildServerAdapter- Parameters:
runningBuild- corresponding running buildoldStatus- previous statusnewStatus- new status
-
buildFinished
public void buildFinished(@NotNull SRunningBuild build)Description copied from interface:BuildServerListenerCalled after build finishing, only if build was not interrupted- Specified by:
buildFinishedin interfaceBuildServerListener- Overrides:
buildFinishedin classBuildServerAdapter- Parameters:
build- running build // TODO: shall pass SFinishedBuild as parameter
-
entryCreated
public void entryCreated(@NotNull SFinishedBuild build)Description copied from interface:BuildServerListenerCalled when build is added to the history.- Specified by:
entryCreatedin interfaceBuildServerListener- Overrides:
entryCreatedin classBuildServerAdapter
-
handleFinishedBuild
public void handleFinishedBuild(@NotNull SRunningBuild build)
-
buildInterrupted
public void buildInterrupted(@NotNull SRunningBuild build)Description copied from interface:BuildServerListenerCalled after build finishing, only if build was interrupted- Specified by:
buildInterruptedin interfaceBuildServerListener- Overrides:
buildInterruptedin classBuildServerAdapter- Parameters:
build- running build // TODO: shall pass SFinishedBuild as parameter
-
labelingFailed
public void labelingFailed(@NotNull SBuild build, @NotNull VcsRoot root, @NotNull Throwable exception)Description copied from interface:BuildServerListenerLabeling process failed for the specified build and root with the specified problem.- Specified by:
labelingFailedin interfaceBuildServerListener- Overrides:
labelingFailedin classBuildServerAdapter- Parameters:
build- build for which labeling failed.root- root for which labeling failed.exception- labeling cause.
-
responsibleChanged
public void responsibleChanged(@NotNull SBuildType bt, @NotNull ResponsibilityEntry oldValue, @NotNull ResponsibilityEntry newValue)Description copied from interface:BuildServerListenerCalled when build configuration responsible has changed, or responsibility status has changed
Some events may be omitted when the responsibility was changed on another node, i.e. it's not called on read-only node when the responsibility was assigned and immediately removed on the main server.- Specified by:
responsibleChangedin interfaceBuildServerListener- Overrides:
responsibleChangedin classBuildServerAdapter- Parameters:
bt- build configurationoldValue- previous responsibility entrynewValue- new responsibility entry
-
responsibleChanged
public void responsibleChanged(@NotNull SProject project, @NotNull Collection<TestName> testNames, @NotNull ResponsibilityEntry entry, boolean isUserAction)Description copied from interface:BuildServerListenerCalled when responsibility for several tests at once is changed.
Some events may be omitted when the responsibility was changed on another node, i.e. it's not called on read-only node when the responsibility was assigned and immediately removed on the main server.- Specified by:
responsibleChangedin interfaceBuildServerListener- Overrides:
responsibleChangedin classBuildServerAdapter- Parameters:
project- the projecttestNames- test namesentry- the new responsibility entry for each testisUserAction- true if responsibility status was changed manually via Web UI
-
responsibleChanged
public void responsibleChanged(@NotNull SProject project, @NotNull Collection<BuildProblemInfo> buildProblems, @Nullable ResponsibilityEntry entry)Description copied from interface:BuildServerListenerCalled when responsibility for several build problems at once is changed.
Some events may be omitted when the responsibility was changed on another node, i.e. it's not called on read-only node when the responsibility was assigned and immediately removed on the main server.- Specified by:
responsibleChangedin interfaceBuildServerListener- Overrides:
responsibleChangedin classBuildServerAdapter- Parameters:
project- the projectbuildProblems- build problemsentry- the new responsibility entry or null if responsibility is removed (better useBuildServerListener.responsibleRemoved(SProject, Collection, ResponsibilityEntry)method to subscribe to the 'removed' events)
-
serverShutdown
public void serverShutdown()
Description copied from interface:ServerListenerCalled when server shutdown has been started. In addition, this method is called for a plugin before it is unloaded, may be used for releasing resources and cleanup.- Specified by:
serverShutdownin interfaceServerListener- Overrides:
serverShutdownin classBuildServerAdapter
-
testsMuted
public void testsMuted(@NotNull MuteInfo muteInfo)Description copied from interface:BuildServerListenerCalled when a set of tests are muted (with same mute properties). All tests are in the same project.
The method in not called when the test was muted on another node (i.e. when the current node is a read-only node)- Specified by:
testsMutedin interfaceBuildServerListener- Overrides:
testsMutedin classBuildServerAdapter- Parameters:
muteInfo- mute info
-
testsUnmuted
public void testsUnmuted(@Nullable SUser user, @NotNull Map<MuteInfo,Collection<STest>> unmutedGroups)Description copied from interface:BuildServerListenerCalled when several of tests have been unmuted. Tests can be belong to several projects.
The method in not called when the test was unmuted on another node (i.e. when the current node is a read-only node)- Specified by:
testsUnmutedin interfaceBuildServerListener- Overrides:
testsUnmutedin classBuildServerAdapter- Parameters:
user- user that unmuted tests, or null if they were unmuted automatically.unmutedGroups- groups of tests that were unmuted.
-
buildProblemsMuted
public void buildProblemsMuted(@NotNull MuteInfo muteInfo)Description copied from interface:BuildServerListenerCalled when a set of build problems are muted (with same mute properties). All problems belong the same project.
The method in not called when the problem was muted on another node (i.e. when the current node is a read-only node)- Specified by:
buildProblemsMutedin interfaceBuildServerListener- Overrides:
buildProblemsMutedin classBuildServerAdapter- Parameters:
muteInfo- mute info
-
buildProblemsUnmuted
public void buildProblemsUnmuted(@Nullable SUser user, @NotNull Map<MuteInfo,Collection<BuildProblemInfo>> unmutedGroups)Description copied from interface:BuildServerListenerCalled when a set of build problems are unmuted. Problems can be belong to several projects.
The method in not called when the problem was unmuted on another node (i.e. when the current node is a read-only node)- Specified by:
buildProblemsUnmutedin interfaceBuildServerListener- Overrides:
buildProblemsUnmutedin classBuildServerAdapter- Parameters:
user- user that unmuted problems, or null if they were unmuted automatically.unmutedGroups- groups of build problems that were unmuted.
-
-