jetbrains.buildServer.agent
Interface BuildAgent

All Superinterfaces:
Agent, AgentLogListener

public interface BuildAgent
extends Agent

Author:
Kir

Field Summary
 
Fields inherited from interface jetbrains.buildServer.agentServer.Agent
AGENT_PLUGIN_NAME_FILTER, AGENT_PLUGIN_NAMES_FILTER, AGENT_PLUGINS_DIR, AGENT_UPDATE_CONTENTS_PATH, AGENT_UPDATE_CONTENTS_XML, BUILD_AGENT, DISTRIBUTION_ARCH_NAME, UPDATE_PATH
 
Method Summary
 void ensureIdle()
          Blocks until currently running build finishes and all build messages are sent to the server
 void ensureNoPendingCommands()
          Blocks until all pending build messages are sent to the server
 java.lang.String getAccessCode()
          Deprecated. use AgentRunningBuild!
 java.lang.String getBuildId()
          Current build id
 BuildAgentConfiguration getConfiguration()
          Returns agent configuration
 java.lang.Integer getId()
          Agent id.
 java.util.Collection<AgentBuildRunner> getRunners()
          Returns array of registered runners
 Server getServerProxy()
           
 XmlRpcHandlerManager getXmlRpcHandlerManager()
          XML-RPC handler manager to manage XML-RPC handlers
 void init(java.lang.String[] args)
          Deprecated. should not be called from plugin code
 boolean isRunning()
          Agent is running build
 boolean registerOnBuildServer(java.lang.String buildId)
          Register on server
 boolean shutdown()
          immediate shutdown, running build will be terminated
 boolean shutdownWaitForBuild()
          shutdown after build has finished
 void start()
          starts agent
 void unregisterFromBuildServer()
          Disconnect build agent from server
 
Methods inherited from interface jetbrains.buildServer.agentServer.Agent
ping, runBuild, stopBuild, upgrade
 
Methods inherited from interface jetbrains.buildServer.agentServer.AgentLogListener
buildFinished, buildInterrupted, isBuildFailing, log, markCheckoutDirClean, markCheckoutDirDirty
 

Method Detail

start

void start()
starts agent


shutdown

boolean shutdown()
immediate shutdown, running build will be terminated

Returns:
true

shutdownWaitForBuild

boolean shutdownWaitForBuild()
shutdown after build has finished

Returns:
true

getId

java.lang.Integer getId()
Agent id.

Returns:
Agent id

getBuildId

@Nullable
java.lang.String getBuildId()
Current build id

Returns:
Current build id

getAccessCode

@Nullable
java.lang.String getAccessCode()
Deprecated. use AgentRunningBuild!

Server access code

Returns:
Server access code

ensureIdle

void ensureIdle()
Blocks until currently running build finishes and all build messages are sent to the server


ensureNoPendingCommands

void ensureNoPendingCommands()
Blocks until all pending build messages are sent to the server


init

@Deprecated
void init(java.lang.String[] args)
Deprecated. should not be called from plugin code


getRunners

java.util.Collection<AgentBuildRunner> getRunners()
Returns array of registered runners

Returns:
array of registered runners

getServerProxy

@Nullable
Server getServerProxy()
Returns:
remote server proxy

getConfiguration

BuildAgentConfiguration getConfiguration()
Returns agent configuration

Returns:
agent configuration

registerOnBuildServer

boolean registerOnBuildServer(java.lang.String buildId)
Register on server

Parameters:
buildId - running build id
Returns:
success flag

unregisterFromBuildServer

void unregisterFromBuildServer()
Disconnect build agent from server


isRunning

boolean isRunning()
Agent is running build

Returns:
running flag

getXmlRpcHandlerManager

XmlRpcHandlerManager getXmlRpcHandlerManager()
XML-RPC handler manager to manage XML-RPC handlers

Returns:
XML-RPC handler manager to register/unregister handlers