Class RemoteBuildAgent
java.lang.Object
com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
com.atlassian.bamboo.v2.build.agent.remote.RemoteBuildAgent
- All Implemented Interfaces:
ExecutableBuildAgent
This class overrides DefaultBuildAgent's shutdown() and
onMainThreadEnd()
methods to make sure that the agent
process terminates when the main thread is finished.-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
DefaultBuildAgent.MainAgentThread
-
Field Summary
Fields inherited from class com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
buildContext
-
Constructor Summary
ConstructorDescriptionRemoteBuildAgent
(AgentConfiguration agentConfiguration, RemoteAgentPluginEventHandlerImpl deferredEventsHandler, int heartbeatIntervalSeconds) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
void
This method is called when the build process is completed and the result processing has finished.void
onCancelCurrentBuildEvent
(@NotNull CancelCurrentBuildEvent cancelCurrentBuildEvent) void
onContextReceived
(@NotNull CommonContext commonContext) This method is called when the agent has just retrieved a context from queueprotected void
protected void
shutdown()
void
start()
Starts the build agentvoid
stopNicely
(int statusCode) Attempt to stop the agent and wait for the current build (if any) to stop building.Methods inherited from class com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
build, cancelBuild, cancelBuild, compareTo, disable, enable, equals, executeWithCurrentContext, getAgentStatus, getBuilding, getDescription, getId, getName, hashCode, incrementError, isActive, isCancelling, isEnabled, isStopping, resetErrors, setContextToBuild, stop, stopNicely, waitForStop
-
Constructor Details
-
RemoteBuildAgent
public RemoteBuildAgent(AgentConfiguration agentConfiguration, RemoteAgentPluginEventHandlerImpl deferredEventsHandler, int heartbeatIntervalSeconds)
-
-
Method Details
-
start
public void start()Description copied from interface:ExecutableBuildAgent
Starts the build agent- Specified by:
start
in interfaceExecutableBuildAgent
- Overrides:
start
in classDefaultBuildAgent
-
stopNicely
public void stopNicely(int statusCode) Description copied from interface:ExecutableBuildAgent
Attempt to stop the agent and wait for the current build (if any) to stop building. If it's a non-local agent, then it will terminate with the given status code.- Specified by:
stopNicely
in interfaceExecutableBuildAgent
- Overrides:
stopNicely
in classDefaultBuildAgent
-
shutdown
protected void shutdown()- Overrides:
shutdown
in classDefaultBuildAgent
-
onMainThreadEnd
protected void onMainThreadEnd()- Overrides:
onMainThreadEnd
in classDefaultBuildAgent
-
onContextReceived
Description copied from interface:ExecutableBuildAgent
This method is called when the agent has just retrieved a context from queue- Specified by:
onContextReceived
in interfaceExecutableBuildAgent
- Overrides:
onContextReceived
in classDefaultBuildAgent
-
onAgentReadyToBuild
protected void onAgentReadyToBuild()- Overrides:
onAgentReadyToBuild
in classDefaultBuildAgent
-
onBetweenBuilds
protected void onBetweenBuilds()- Overrides:
onBetweenBuilds
in classDefaultBuildAgent
-
onBuildProcessingFinished
public void onBuildProcessingFinished()Description copied from interface:ExecutableBuildAgent
This method is called when the build process is completed and the result processing has finished.- Specified by:
onBuildProcessingFinished
in interfaceExecutableBuildAgent
- Overrides:
onBuildProcessingFinished
in classDefaultBuildAgent
-
onCancelCurrentBuildEvent
@EventListener public void onCancelCurrentBuildEvent(@NotNull @NotNull CancelCurrentBuildEvent cancelCurrentBuildEvent)
-