Class RemoteBuildAgent
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
-
- com.atlassian.bamboo.v2.build.agent.remote.RemoteBuildAgent
-
- All Implemented Interfaces:
ExecutableBuildAgent
public class RemoteBuildAgent extends DefaultBuildAgent
This class overrides DefaultBuildAgent's shutdown() andonMainThreadEnd()
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
Constructors Constructor Description RemoteBuildAgent(AgentConfiguration agentConfiguration, RemoteAgentPluginEventHandlerImpl deferredEventsHandler, int heartbeatIntervalSeconds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
onAgentReadyToBuild()
protected void
onBetweenBuilds()
void
onBuildProcessingFinished()
This method is called when the build process is completed and the result processing has finished.void
onContextReceived(@NotNull CommonContext commonContext)
This method is called when the agent has just retrieved a context from queueprotected void
onMainThreadEnd()
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, compareTo, disable, enable, equals, executeWithCurrentContext, getAgentStatus, getBuilding, getDescription, getId, getName, hashCode, incrementError, isActive, isCancelling, isEnabled, isStopping, resetErrors, setContextToBuild, stop, stopNicely, waitForStop
-
-
-
-
Constructor Detail
-
RemoteBuildAgent
public RemoteBuildAgent(AgentConfiguration agentConfiguration, RemoteAgentPluginEventHandlerImpl deferredEventsHandler, int heartbeatIntervalSeconds)
-
-
Method Detail
-
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
public void onContextReceived(@NotNull @NotNull CommonContext commonContext)
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
-
-