Class MockAgentDescription
- java.lang.Object
-
- jetbrains.buildServer.serverSide.agentTypes.AgentDescriptionBase
-
- jetbrains.buildServer.serverSide.impl.MockAgentDescription
-
- All Implemented Interfaces:
AgentDescription
,MutableAgentDescription
- Direct Known Subclasses:
MockAgentType
public class MockAgentDescription extends AgentDescriptionBase implements AgentDescription
- Author:
- Eugene Petrenko Created: 08.09.2009 13:07:51
-
-
Constructor Summary
Constructors Constructor Description MockAgentDescription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAvailableRunnerType(RunType typeValue)
void
addAvailableVcsPlugin(String pluginName)
void
addBuildParameter(String name, String val)
void
addConfigParameter(String name, String val)
Map<String,String>
getAvailableParameters()
Returns map of parameters available on the agent.Set<String>
getAvailableRunTypeIds()
Returns set of runner types available on the agentList<RunType>
getAvailableRunTypes()
Returns list of runners available on the agentList<String>
getAvailableVcsPlugins()
int
getCpuBenchmarkIndex()
Returns this agent CPU benchmark index.int
getCpuCount()
Returns the number of CPUs of this agentString
getOperatingSystemName()
Returns name of the operating system where the agent is currently running.boolean
isCaseInsensitiveEnvironment()
boolean
isEphemeral()
Indicates whether these parameters only exist in memory and represent description of a particular agentvoid
setCpuBenchmarkIndex(int cpuBenchmarkIndex)
void
setCpuCount(int cpuCount)
void
setEphemeral(boolean ephemeral)
void
setOperatingSystemName(String operatingSystemName)
-
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, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.AgentDescription
getAvailableParameterValue, getBuildParameters, getConfigurationParameters, getDefinedParameters
-
-
-
-
Method Detail
-
getAvailableRunTypes
@NotNull public List<RunType> getAvailableRunTypes()
Description copied from interface:AgentDescription
Returns list of runners available on the agent- Specified by:
getAvailableRunTypes
in interfaceAgentDescription
- Returns:
- list of runners ordered by display name
-
getAvailableParameters
@NotNull public Map<String,String> getAvailableParameters()
Description copied from interface:AgentDescription
Returns map of parameters available on the agent. These parameters include environment variables defined for the agent process as well as parameters defined in the agent configuration file.- Specified by:
getAvailableParameters
in interfaceAgentDescription
- Overrides:
getAvailableParameters
in classAgentDescriptionBase
- Returns:
- see above
-
getAvailableRunTypeIds
@NotNull public Set<String> getAvailableRunTypeIds()
Description copied from interface:AgentDescription
Returns set of runner types available on the agent- Specified by:
getAvailableRunTypeIds
in interfaceAgentDescription
- Returns:
- set of runner types
-
getAvailableVcsPlugins
@NotNull public List<String> getAvailableVcsPlugins()
- Specified by:
getAvailableVcsPlugins
in interfaceAgentDescription
-
getOperatingSystemName
@NotNull public String getOperatingSystemName()
Description copied from interface:AgentDescription
Returns name of the operating system where the agent is currently running.- Specified by:
getOperatingSystemName
in interfaceAgentDescription
- Returns:
- name of the operating system where the agent is currently running.
-
getCpuBenchmarkIndex
public int getCpuBenchmarkIndex()
Description copied from interface:AgentDescription
Returns this agent CPU benchmark index. The higher this value the more powerful agent CPU.- Specified by:
getCpuBenchmarkIndex
in interfaceAgentDescription
- Returns:
- CPU index or -1 if index is not available
-
getCpuCount
public int getCpuCount()
Description copied from interface:AgentDescription
Returns the number of CPUs of this agent- Specified by:
getCpuCount
in interfaceAgentDescription
- Overrides:
getCpuCount
in classAgentDescriptionBase
- Returns:
- number of CPUs or -1 if count is not available
-
isCaseInsensitiveEnvironment
public boolean isCaseInsensitiveEnvironment()
- Specified by:
isCaseInsensitiveEnvironment
in interfaceAgentDescription
- Overrides:
isCaseInsensitiveEnvironment
in classAgentDescriptionBase
- Returns:
- true if names of environment variables are case insensitive
-
setOperatingSystemName
public void setOperatingSystemName(String operatingSystemName)
-
setCpuBenchmarkIndex
public void setCpuBenchmarkIndex(int cpuBenchmarkIndex)
-
setCpuCount
public void setCpuCount(int cpuCount)
-
addAvailableRunnerType
public void addAvailableRunnerType(RunType typeValue)
-
addAvailableVcsPlugin
public void addAvailableVcsPlugin(@NotNull String pluginName)
-
isEphemeral
public boolean isEphemeral()
Description copied from class:AgentDescriptionBase
Indicates whether these parameters only exist in memory and represent description of a particular agent- Overrides:
isEphemeral
in classAgentDescriptionBase
- Returns:
-
setEphemeral
public void setEphemeral(boolean ephemeral)
-
-