public class BuildAgentDecorator extends Object implements BuildAgent
BuildAgent.BuildAgentVisitor
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Function<BuildAgent,BuildAgentDecorator> |
toDecorator |
Constructor and Description |
---|
BuildAgentDecorator(BuildAgent buildAgent) |
Modifier and Type | Method and Description |
---|---|
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) |
String |
getName() |
AgentType |
getType() |
boolean |
isActive() |
boolean |
isBusy()
Returns true if an agent is building or is cancelling a build
|
boolean |
isDedicated() |
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) |
public static com.google.common.base.Function<BuildAgent,BuildAgentDecorator> toDecorator
public BuildAgentDecorator(@NotNull BuildAgent buildAgent)
@NotNull public com.opensymphony.webwork.dispatcher.json.JSONObject getJson(boolean includeAllProperties)
@NotNull public com.opensymphony.webwork.dispatcher.json.JSONObject getJson() throws com.opensymphony.webwork.dispatcher.json.JSONException
com.opensymphony.webwork.dispatcher.json.JSONException
public long getId()
getId
in interface BambooIdProvider
getId
in interface BuildAgent
public String getName()
getName
in interface NameProvider
getName
in interface BuildAgent
public boolean isActive()
isActive
in interface BuildAgent
public boolean isEnabled()
isEnabled
in interface BuildAgent
@NotNull public AgentStatus getAgentStatus()
getAgentStatus
in interface BuildAgent
@NotNull public PipelineDefinition getDefinition()
getDefinition
in interface BuildAgent
public void setDefinition(@NotNull PipelineDefinition definition)
setDefinition
in interface BuildAgent
public boolean isRequestedToBeStopped()
BuildAgent
isRequestedToBeStopped
in interface BuildAgent
public void setRequestedToBeStopped(boolean requestedToBeStopped)
setRequestedToBeStopped
in interface BuildAgent
public void accept(BuildAgent.BuildAgentVisitor buildAgentVisitor)
BuildAgent
accept
in interface BuildAgent
public boolean isUnresponsive()
BuildAgent
Used for remote agents.
isUnresponsive
in interface BuildAgent
public void setUnresponsive(boolean unresponsive)
setUnresponsive
in interface BuildAgent
public boolean isBusy()
BuildAgent
isBusy
in interface BuildAgent
public int compareTo(BuildAgent buildAgent)
compareTo
in interface Comparable<BuildAgent>
public AgentType getType()
getType
in interface BuildAgent
public boolean isDedicated()
isDedicated
in interface BuildAgent
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.