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
ConstructorsConstructorDescriptionRemoteBuildAgent(AgentConfiguration agentConfiguration, RemoteAgentPluginEventHandlerImpl deferredEventsHandler, int heartbeatIntervalSeconds) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidvoidThis method is called when the build process is completed and the result processing has finished.voidonCancelCurrentBuildEvent(@NotNull CancelCurrentBuildEvent cancelCurrentBuildEvent) voidonContextReceived(@NotNull CommonContext commonContext) This method is called when the agent has just retrieved a context from queueprotected voidprotected 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, 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: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
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
-
onCancelCurrentBuildEvent
@EventListener public void onCancelCurrentBuildEvent(@NotNull @NotNull CancelCurrentBuildEvent cancelCurrentBuildEvent)
-