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 voidonAgentReadyToBuild()protected voidonBetweenBuilds()voidonBuildProcessingFinished()This method is called when the build process is completed and the result processing has finished.voidonContextReceived(@NotNull CommonContext commonContext)This method is called when the agent has just retrieved a context from queueprotected voidonMainThreadEnd()protected voidshutdown()voidstart()Starts the build agentvoidstopNicely(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:ExecutableBuildAgentStarts the build agent- Specified by:
startin interfaceExecutableBuildAgent- Overrides:
startin classDefaultBuildAgent
-
stopNicely
public void stopNicely(int statusCode)
Description copied from interface:ExecutableBuildAgentAttempt 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:
stopNicelyin interfaceExecutableBuildAgent- Overrides:
stopNicelyin classDefaultBuildAgent
-
shutdown
protected void shutdown()
- Overrides:
shutdownin classDefaultBuildAgent
-
onMainThreadEnd
protected void onMainThreadEnd()
- Overrides:
onMainThreadEndin classDefaultBuildAgent
-
onContextReceived
public void onContextReceived(@NotNull @NotNull CommonContext commonContext)Description copied from interface:ExecutableBuildAgentThis method is called when the agent has just retrieved a context from queue- Specified by:
onContextReceivedin interfaceExecutableBuildAgent- Overrides:
onContextReceivedin classDefaultBuildAgent
-
onAgentReadyToBuild
protected void onAgentReadyToBuild()
- Overrides:
onAgentReadyToBuildin classDefaultBuildAgent
-
onBetweenBuilds
protected void onBetweenBuilds()
- Overrides:
onBetweenBuildsin classDefaultBuildAgent
-
onBuildProcessingFinished
public void onBuildProcessingFinished()
Description copied from interface:ExecutableBuildAgentThis method is called when the build process is completed and the result processing has finished.- Specified by:
onBuildProcessingFinishedin interfaceExecutableBuildAgent- Overrides:
onBuildProcessingFinishedin classDefaultBuildAgent
-
-