Package jetbrains.buildServer.serverSide
Interface BuildAgentInit
-
- All Known Subinterfaces:
BuildAgentEx
- All Known Implementing Classes:
AbstractBuildAgent,AbstractBuildAgentContext,DeadAgent,MockBuildAgent,RegisteredAgent,SecuredBuildAgent,UnregisteredAgent
public interface BuildAgentInitContains methods called during build agent initialization
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidgenerateUniqueAgentAuthorizationToken()Generates new agent authorization token for this agent.voidinitAgentTypeId(int agentTypeId)Initializes agent type id in agentvoidinitAuthorized(boolean authorized)Initializes authorized status in agentvoidinitEnabled(boolean enabled)Initializes enabled status in agentbooleanrestoreAgent()Restores this agent data from the database.voidsetAgentTypeId(int agentTypeId)Set agent type id to the instance of the agent.voidsetAuthorizationToken(String agentAuthorizationToken)voidsetId(int id)voidsetName(String name)Sets new name to the agent.
-
-
-
Method Detail
-
restoreAgent
boolean restoreAgent()
Restores this agent data from the database.- Returns:
- true if agent was in the database and its status was restored and false if this agent is new
- Throws:
UnsupportedOperationException- if this agent does not support restoring from the database
-
setId
void setId(int id)
-
setAgentTypeId
void setAgentTypeId(int agentTypeId)
Set agent type id to the instance of the agent.- Parameters:
agentTypeId- new type id.
-
setAuthorizationToken
void setAuthorizationToken(@NotNull String agentAuthorizationToken)
-
generateUniqueAgentAuthorizationToken
void generateUniqueAgentAuthorizationToken()
Generates new agent authorization token for this agent. It is guaranteed that the new authorization token is unique among the all agents in the database.
-
setName
void setName(@NotNull String name) throws IllegalStateExceptionSets new name to the agent.- Parameters:
name- new name for an agent- Throws:
IllegalStateException- if it failed to update name
-
initEnabled
void initEnabled(boolean enabled)
Initializes enabled status in agent- Parameters:
enabled- true if agent is enabled
-
initAuthorized
void initAuthorized(boolean authorized)
Initializes authorized status in agent- Parameters:
enabled- true if agent is authorized
-
initAgentTypeId
void initAgentTypeId(int agentTypeId)
Initializes agent type id in agent
-
-