com.atlassian.bamboo.ww2.actions.agent
Class BuildAgentDecorator

java.lang.Object
  extended by com.atlassian.bamboo.ww2.actions.agent.BuildAgentDecorator
All Implemented Interfaces:
BuildAgent, java.lang.Comparable<BuildAgent>

public class BuildAgentDecorator
extends java.lang.Object
implements BuildAgent


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.bamboo.v2.build.agent.BuildAgent
BuildAgent.BuildAgentVisitor
 
Constructor Summary
BuildAgentDecorator(BuildAgent buildAgent)
           
 
Method Summary
 void accept(BuildAgent.BuildAgentVisitor buildAgentVisitor)
          Runs the appropriate visitor method depending on which type of agent it is
 int compareTo(BuildAgent buildAgent)
           
 AgentStatus getAgentStatus()
           
 PipelineDefinition getDefinition()
           
 long getId()
           
 com.opensymphony.webwork.dispatcher.json.JSONObject getJson()
           
 com.opensymphony.webwork.dispatcher.json.JSONObject getJson(boolean includeAllProperties)
           
 java.lang.String getName()
           
 PipelineDefinition.TYPE getType()
           
 boolean isActive()
           
 boolean isBusy()
          Returns true if an agent is building or is cancelling a build
 boolean isEnabled()
           
 boolean isRequestedToBeStopped()
          Whether or not a call has been made to shutdown the agent after the current build has finished
 boolean isUnresponsive()
          Whether or not the agent has been deemed to be "unresponsive".
 void setDefinition(PipelineDefinition definition)
           
 void setRequestedToBeStopped(boolean requestedToBeStopped)
           
 void setUnresponsive(boolean unresponsive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildAgentDecorator

public BuildAgentDecorator(@NotNull
                           BuildAgent buildAgent)
Method Detail

getJson

@NotNull
public com.opensymphony.webwork.dispatcher.json.JSONObject getJson(boolean includeAllProperties)
                                                            throws com.opensymphony.webwork.dispatcher.json.JSONException
Throws:
com.opensymphony.webwork.dispatcher.json.JSONException

getJson

@NotNull
public com.opensymphony.webwork.dispatcher.json.JSONObject getJson()
                                                            throws com.opensymphony.webwork.dispatcher.json.JSONException
Throws:
com.opensymphony.webwork.dispatcher.json.JSONException

getId

public long getId()
Specified by:
getId in interface BuildAgent

getName

public java.lang.String getName()
Specified by:
getName in interface BuildAgent

isActive

public boolean isActive()
Specified by:
isActive in interface BuildAgent

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface BuildAgent

getAgentStatus

public AgentStatus getAgentStatus()
Specified by:
getAgentStatus in interface BuildAgent

getDefinition

@NotNull
public PipelineDefinition getDefinition()
Specified by:
getDefinition in interface BuildAgent

setDefinition

public void setDefinition(@NotNull
                          PipelineDefinition definition)
Specified by:
setDefinition in interface BuildAgent

isRequestedToBeStopped

public boolean isRequestedToBeStopped()
Description copied from interface: BuildAgent
Whether or not a call has been made to shutdown the agent after the current build has finished

Specified by:
isRequestedToBeStopped in interface BuildAgent
Returns:

setRequestedToBeStopped

public void setRequestedToBeStopped(boolean requestedToBeStopped)
Specified by:
setRequestedToBeStopped in interface BuildAgent

accept

public void accept(BuildAgent.BuildAgentVisitor buildAgentVisitor)
Description copied from interface: BuildAgent
Runs the appropriate visitor method depending on which type of agent it is

Specified by:
accept in interface BuildAgent

isUnresponsive

public boolean isUnresponsive()
Description copied from interface: BuildAgent
Whether or not the agent has been deemed to be "unresponsive". Agents will be first marked as unresponsive before they are made offline. Used for remote agents.

Specified by:
isUnresponsive in interface BuildAgent
Returns:

setUnresponsive

public void setUnresponsive(boolean unresponsive)
Specified by:
setUnresponsive in interface BuildAgent

isBusy

public boolean isBusy()
Description copied from interface: BuildAgent
Returns true if an agent is building or is cancelling a build

Specified by:
isBusy in interface BuildAgent
Returns:

compareTo

public int compareTo(BuildAgent buildAgent)
Specified by:
compareTo in interface java.lang.Comparable<BuildAgent>

getType

public PipelineDefinition.TYPE getType()


Copyright © 2010 Atlassian. All Rights Reserved.