Class MockAgentType
- java.lang.Object
-
- jetbrains.buildServer.serverSide.agentTypes.AgentDescriptionBase
-
- jetbrains.buildServer.serverSide.impl.MockAgentDescription
-
- jetbrains.buildServer.serverSide.impl.MockAgentType
-
- All Implemented Interfaces:
AgentBuildHistory
,AgentDescription
,AgentType
,MutableAgentDescription
,SAgentType
public class MockAgentType extends MockAgentDescription implements SAgentType
-
-
Constructor Summary
Constructors Constructor Description MockAgentType(BuildHistoryEx buildHistory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsAgentDescriptionData()
AgentPool
getAgentPool()
int
getAgentPoolId()
int
getAgentTypeId()
AgentTypeKey
getAgentTypeKey()
List<SFinishedBuild>
getBuildHistory(User user, boolean includeCanceled)
Returns the build history of this agent.AgentTypeDetails
getDetails()
AgentTypePolicy
getPolicy()
SBuildAgent
getRealAgent()
For real agent types returns the corresponding agent or null if it does not exist anymore.void
setAgentPoolId(int agentPoolId)
void
setAgentTypeId(int agentTypeId)
void
setName(String name)
String
toString()
-
Methods inherited from class jetbrains.buildServer.serverSide.impl.MockAgentDescription
addAvailableRunnerType, addAvailableVcsPlugin, addBuildParameter, addConfigParameter, getAvailableParameters, getAvailableRunTypeIds, getAvailableRunTypes, getAvailableVcsPlugins, getCpuBenchmarkIndex, getCpuCount, getOperatingSystemName, isCaseInsensitiveEnvironment, isEphemeral, setCpuBenchmarkIndex, setCpuCount, setEphemeral, setOperatingSystemName
-
Methods inherited from class jetbrains.buildServer.serverSide.agentTypes.AgentDescriptionBase
getAvailableParameterValue, getBuildParameters, getConfigurationParameters, getDefinedParameters, isCaseInsensitiveEnvironment, updateParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.AgentDescription
getAvailableParameters, getAvailableParameterValue, getAvailableRunTypeIds, getAvailableRunTypes, getAvailableVcsPlugins, getBuildParameters, getConfigurationParameters, getCpuBenchmarkIndex, getCpuCount, getDefinedParameters, getOperatingSystemName, isCaseInsensitiveEnvironment
-
Methods inherited from interface jetbrains.buildServer.serverSide.agentTypes.SAgentType
isCloud
-
-
-
-
Constructor Detail
-
MockAgentType
public MockAgentType(BuildHistoryEx buildHistory)
-
-
Method Detail
-
setName
public void setName(String name)
-
setAgentTypeId
public void setAgentTypeId(int agentTypeId)
-
getAgentTypeId
public int getAgentTypeId()
- Specified by:
getAgentTypeId
in interfaceAgentType
-
getAgentTypeKey
@NotNull public AgentTypeKey getAgentTypeKey()
- Specified by:
getAgentTypeKey
in interfaceAgentType
-
setAgentPoolId
public void setAgentPoolId(int agentPoolId)
-
getAgentPoolId
public int getAgentPoolId()
- Specified by:
getAgentPoolId
in interfaceAgentType
-
getBuildHistory
@NotNull public List<SFinishedBuild> getBuildHistory(@Nullable User user, boolean includeCanceled)
Description copied from interface:AgentBuildHistory
Returns the build history of this agent.The history can be filtered by user, as well as by cancelled builds.
- Specified by:
getBuildHistory
in interfaceAgentBuildHistory
- Parameters:
user
- if set the result will contain only builds byuser
includeCanceled
- if set the result will include canceled builds as well- Returns:
- build history
-
getPolicy
@NotNull public AgentTypePolicy getPolicy()
-
getAgentPool
@NotNull public AgentPool getAgentPool()
- Specified by:
getAgentPool
in interfaceSAgentType
-
getRealAgent
@Nullable public SBuildAgent getRealAgent()
Description copied from interface:SAgentType
For real agent types returns the corresponding agent or null if it does not exist anymore. For cloud agent types returns null always.- Specified by:
getRealAgent
in interfaceSAgentType
- Returns:
- see above
-
containsAgentDescriptionData
public boolean containsAgentDescriptionData()
- Specified by:
containsAgentDescriptionData
in interfaceSAgentType
- Returns:
- true if agent contains AgentDescription from some connected agent
-
getDetails
@NotNull public AgentTypeDetails getDetails()
- Specified by:
getDetails
in interfaceSAgentType
- Returns:
- runtime details of the associated agent type
-
-