Class AgentServiceMessagesRegisterImpl
- java.lang.Object
-
- jetbrains.buildServer.agent.AgentLifeCycleAdapter
-
- jetbrains.buildServer.agent.impl.inspections.AgentServiceMessagesRegisterImpl
-
- All Implemented Interfaces:
EventListener,AgentExtension,AgentLifeCycleListener,BuildMessagesTranslator,ServiceMessagesRegister,TeamCityExtension,PositionAware,PositionConstraintAware
public class AgentServiceMessagesRegisterImpl extends AgentLifeCycleAdapter implements BuildMessagesTranslator, ServiceMessagesRegister, PositionAware
Created by IntelliJ IDEA. User: Leonid.Shalupov Date: 24.07.2008 Time: 16:23:27
-
-
Constructor Summary
Constructors Constructor Description AgentServiceMessagesRegisterImpl(EventDispatcher<AgentLifeCycleListener> agentDispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildStarted(AgentRunningBuild runningBuild)Called after agent receives start build command from the server.PositionConstraintgetConstraint()Constraint to be respected during objects sorting.StringgetOrderId()Returns object id that can be referenced by {PositionConstraint}voidregisterHandler(String messageType, ServiceMessageHandler handler)Register service message handlervoidremoveHandler(String messageType)Remove service message handler Does nothing if handler for messageType wasn't registeredList<BuildMessage1>translateMessages(AgentRunningBuild build, List<BuildMessage1> messages)Translates collection of messages to a number of some other messages.-
Methods inherited from class jetbrains.buildServer.agent.AgentLifeCycleAdapter
afterAgentConfigurationLoaded, afterAtrifactsPublished, agentInitialized, agentShutdown, agentStarted, beforeAgentConfigurationLoaded, beforeBuildFinish, beforeBuildFinish, beforeBuildInterrupted, beforeRunnerStart, beforeRunnerStart, buildFinished, buildFinished, checkoutDirectoryRemoved, checkoutModeResolved, dependenciesDownloaded, messageLogged, messageLogged, personalPatchApplied, personalPatchReverted, pluginsLoaded, preparationFinished, runnerFinished, sourcesUpdated
-
-
-
-
Constructor Detail
-
AgentServiceMessagesRegisterImpl
public AgentServiceMessagesRegisterImpl(@NotNull EventDispatcher<AgentLifeCycleListener> agentDispatcher)
-
-
Method Detail
-
registerHandler
public void registerHandler(@NotNull String messageType, @NotNull ServiceMessageHandler handler)Description copied from interface:ServiceMessagesRegisterRegister service message handler- Specified by:
registerHandlerin interfaceServiceMessagesRegister- Parameters:
messageType- service message namehandler- service message handler to be registered
-
removeHandler
public void removeHandler(@NotNull String messageType)Description copied from interface:ServiceMessagesRegisterRemove service message handler Does nothing if handler for messageType wasn't registered- Specified by:
removeHandlerin interfaceServiceMessagesRegister- Parameters:
messageType- service message name
-
buildStarted
public void buildStarted(@NotNull AgentRunningBuild runningBuild)Description copied from interface:AgentLifeCycleListenerCalled after agent receives start build command from the server. To register custom build parameters provideAgentPropertiesExtensionagent extension. Note, methods from that interface are called before that method.- Specified by:
buildStartedin interfaceAgentLifeCycleListener- Overrides:
buildStartedin classAgentLifeCycleAdapter- Parameters:
runningBuild- information about running build
-
translateMessages
@NotNull public List<BuildMessage1> translateMessages(@NotNull AgentRunningBuild build, @NotNull List<BuildMessage1> messages)
Description copied from interface:BuildMessagesTranslatorTranslates collection of messages to a number of some other messages.- Specified by:
translateMessagesin interfaceBuildMessagesTranslatormessages- messages to translate- Returns:
- a list of translated messages
-
getConstraint
@NotNull public PositionConstraint getConstraint()
Description copied from interface:PositionConstraintAwareConstraint to be respected during objects sorting.- Specified by:
getConstraintin interfacePositionConstraintAware- Returns:
- position constraint
-
getOrderId
@NotNull public String getOrderId()
Description copied from interface:PositionAwareReturns object id that can be referenced by {PositionConstraint}- Specified by:
getOrderIdin interfacePositionAware- Returns:
- object id
-
-