com.atlassian.bamboo.v2.build.agent.remote
Class RemoteBuildAgent

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
      extended by com.atlassian.bamboo.v2.build.agent.remote.RemoteBuildAgent
All Implemented Interfaces:
ExecutableBuildAgent, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class RemoteBuildAgent
extends DefaultBuildAgent
implements org.springframework.context.ApplicationContextAware

This class overrides DefaultBuildAgent's shutdown() and onMainThreadFinished() methods to make sure that the agent process terminates when the main thread is finished.


Constructor Summary
RemoteBuildAgent(BuildAgentController buildAgentController, BuildLoggerManager buildLoggerManager, long agentId, String agentName, String agentDescription, RemoteAgentPluginEventHandlerImpl deferredEventsHandler, int heartbeatIntervalSeconds)
           
 
Method Summary
protected  void onBetweenBuilds()
           
 void onContextReceived()
          This method is called when the agent has just retrieved a context from queue
protected  void onMainThreadFinished()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
protected  void shutdown()
           
 
Methods inherited from class com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
build, cancelBuild, compareTo, disable, enable, equals, getAgentStatus, getBuilding, getDescription, getId, getName, hashCode, incrementError, isActive, isCancelling, isEnabled, isStopping, onBuildProcessingFinished, resetErrors, setContextToBuild, start, stop, stopNicely, waitForStop
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteBuildAgent

public RemoteBuildAgent(BuildAgentController buildAgentController,
                        BuildLoggerManager buildLoggerManager,
                        long agentId,
                        String agentName,
                        String agentDescription,
                        RemoteAgentPluginEventHandlerImpl deferredEventsHandler,
                        int heartbeatIntervalSeconds)
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

shutdown

protected void shutdown()
Overrides:
shutdown in class DefaultBuildAgent

onMainThreadFinished

protected void onMainThreadFinished()
Overrides:
onMainThreadFinished in class DefaultBuildAgent

onContextReceived

public void onContextReceived()
Description copied from interface: ExecutableBuildAgent
This method is called when the agent has just retrieved a context from queue

Specified by:
onContextReceived in interface ExecutableBuildAgent
Overrides:
onContextReceived in class DefaultBuildAgent

onBetweenBuilds

protected void onBetweenBuilds()
Overrides:
onBetweenBuilds in class DefaultBuildAgent


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.