Class BuildAgentDecorator
java.lang.Object
com.atlassian.bamboo.ww2.actions.agent.BuildAgentDecorator
- All Implemented Interfaces:
BambooIdProvider,NameProvider,BuildAgent,Comparable<BuildAgent>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.v2.build.agent.BuildAgent
BuildAgent.BuildAgentVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.google.common.base.Function<BuildAgent,BuildAgentDecorator> Fields inherited from interface com.atlassian.bamboo.v2.build.agent.BuildAgent
EPHEMERAL_AGENT_TEMPLATE_ID_KEY, EPHEMERAL_AGENT_TEMPLATE_NAME_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(BuildAgent.BuildAgentVisitor buildAgentVisitor) Runs the appropriate visitor method depending on which type of agent it isintcompareTo(BuildAgent buildAgent) @NotNull AgentStatus@NotNull PipelineDefinitionlonggetId()@NotNull com.opensymphony.webwork.dispatcher.json.JSONObjectgetJson()@NotNull com.opensymphony.webwork.dispatcher.json.JSONObjectgetJson(boolean includeAllProperties) @NotNull StringgetName()getType()booleanisActive()booleanisBusy()Returns true if an agent is building or is cancelling a buildbooleanbooleanbooleanWhether or not a call has been made to shutdown the agent after the current build has finishedbooleanWhether or not the agent has been deemed to be "unresponsive".voidsetDefinition(@NotNull PipelineDefinition definition) voidsetRequestedToBeStopped(boolean requestedToBeStopped) voidsetUnresponsive(boolean unresponsive)
-
Field Details
-
toDecorator
-
-
Constructor Details
-
BuildAgentDecorator
-
-
Method Details
-
getJson
@NotNull public @NotNull com.opensymphony.webwork.dispatcher.json.JSONObject getJson(boolean includeAllProperties) -
getJson
@NotNull public @NotNull 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:
getIdin interfaceBambooIdProvider- Specified by:
getIdin interfaceBuildAgent
-
getName
- Specified by:
getNamein interfaceBuildAgent- Specified by:
getNamein interfaceNameProvider
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceBuildAgent
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceBuildAgent
-
getAgentStatus
- Specified by:
getAgentStatusin interfaceBuildAgent
-
getDefinition
- Specified by:
getDefinitionin interfaceBuildAgent
-
setDefinition
- Specified by:
setDefinitionin interfaceBuildAgent
-
isRequestedToBeStopped
public boolean isRequestedToBeStopped()Description copied from interface:BuildAgentWhether or not a call has been made to shutdown the agent after the current build has finished- Specified by:
isRequestedToBeStoppedin interfaceBuildAgent- Returns:
-
setRequestedToBeStopped
public void setRequestedToBeStopped(boolean requestedToBeStopped) - Specified by:
setRequestedToBeStoppedin interfaceBuildAgent
-
accept
Description copied from interface:BuildAgentRuns the appropriate visitor method depending on which type of agent it is- Specified by:
acceptin interfaceBuildAgent
-
isUnresponsive
public boolean isUnresponsive()Description copied from interface:BuildAgentWhether 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:
isUnresponsivein interfaceBuildAgent- Returns:
-
setUnresponsive
public void setUnresponsive(boolean unresponsive) - Specified by:
setUnresponsivein interfaceBuildAgent
-
isBusy
public boolean isBusy()Description copied from interface:BuildAgentReturns true if an agent is building or is cancelling a build- Specified by:
isBusyin interfaceBuildAgent- Returns:
-
compareTo
- Specified by:
compareToin interfaceComparable<BuildAgent>
-
getType
- Specified by:
getTypein interfaceBuildAgent
-
isDedicated
public boolean isDedicated()- Specified by:
isDedicatedin interfaceBuildAgent
-