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
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(BuildAgent.BuildAgentVisitor buildAgentVisitor) Runs the appropriate visitor method depending on which type of agent it isint
compareTo
(BuildAgent buildAgent) @NotNull AgentStatus
@NotNull PipelineDefinition
long
getId()
@NotNull com.opensymphony.webwork.dispatcher.json.JSONObject
getJson()
@NotNull com.opensymphony.webwork.dispatcher.json.JSONObject
getJson
(boolean includeAllProperties) getName()
getType()
boolean
isActive()
boolean
isBusy()
Returns true if an agent is building or is cancelling a buildboolean
boolean
boolean
Whether or not a call has been made to shutdown the agent after the current build has finishedboolean
Whether or not the agent has been deemed to be "unresponsive".void
setDefinition
(@NotNull PipelineDefinition definition) void
setRequestedToBeStopped
(boolean requestedToBeStopped) void
setUnresponsive
(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:
getId
in interfaceBambooIdProvider
- Specified by:
getId
in interfaceBuildAgent
-
getName
- Specified by:
getName
in interfaceBuildAgent
- Specified by:
getName
in interfaceNameProvider
-
isActive
public boolean isActive()- Specified by:
isActive
in interfaceBuildAgent
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceBuildAgent
-
getAgentStatus
- Specified by:
getAgentStatus
in interfaceBuildAgent
-
getDefinition
- Specified by:
getDefinition
in interfaceBuildAgent
-
setDefinition
- Specified by:
setDefinition
in interfaceBuildAgent
-
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 interfaceBuildAgent
- Returns:
-
setRequestedToBeStopped
public void setRequestedToBeStopped(boolean requestedToBeStopped) - Specified by:
setRequestedToBeStopped
in interfaceBuildAgent
-
accept
Description copied from interface:BuildAgent
Runs the appropriate visitor method depending on which type of agent it is- Specified by:
accept
in interfaceBuildAgent
-
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 interfaceBuildAgent
- Returns:
-
setUnresponsive
public void setUnresponsive(boolean unresponsive) - Specified by:
setUnresponsive
in interfaceBuildAgent
-
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 interfaceBuildAgent
- Returns:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BuildAgent>
-
getType
- Specified by:
getType
in interfaceBuildAgent
-
isDedicated
public boolean isDedicated()- Specified by:
isDedicated
in interfaceBuildAgent
-