Class XmlRpcBasedServer
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.BaseXmlRpcServer
-
- jetbrains.buildServer.serverSide.impl.XmlRpcBasedServer
-
- All Implemented Interfaces:
AgentLogListener,Server
public class XmlRpcBasedServer extends BaseXmlRpcServer implements Server
-
-
Field Summary
Fields Modifier and Type Field Description static StringBUILD_RPC_CALL_AUTH_ENABLED-
Fields inherited from interface jetbrains.buildServer.agentServer.Server
BUILD_SERVER
-
-
Constructor Summary
Constructors Constructor Description XmlRpcBasedServer(BuildAgentMessagesQueue messagesQueue, XmlRpcSessionHolder sessionHolder, ServerResponsibility serverResponsibility, TeamCityNodes teamCityNodes, DetachedBuildTracker detachedBuildTracker)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanbeginPatchApplying(String buildId)Deprecated.left for compatibility with old agentsbooleanbuildDetachedFromAgent(String buildId, String lastStepId)Indicates that the build tasks are finished on the agent but the build itself should continue until some external process finishes itbooleanbuildFinished(String buildId, Date finishDate, boolean buildFailed)booleanbuildInterrupted(String buildId)Same asAgentLogListener.buildInterrupted(String, String, boolean)with parameters: build, "", truebooleanbuildInterrupted(String buildId, String comment, boolean needRequeue)booleanisBuildFailing(String buildId)Checks for build status on the build server.booleanlog(String buildId, Vector messagesXml)booleanmarkCheckoutDirClean(String buildId)Deprecated.left for compatibility with old agentsbooleanmarkCheckoutDirDirty(String buildId)Deprecated.left for compatibility with old agentsbooleanpatchApplied(String buildId)Deprecated.left for compatibility with old agentsbooleanping()This method is called by build agent to check if build server reachablestatic booleanprojectTemporarilyUnavailableOnTheCurrentNode(SRunningBuild build)voidsetAgentPersister(AgentPersister agentPersister)voidsetBuildAgentFactory(BuildAgentFactory buildAgentFactory)voidsetBuildAgentManager(BuildAgentManagerEx buildAgentManager)voidsetRunningBuildsManager(RunningBuildsManagerEx runningBuildsManager)booleanunregister(int id)booleanunregister(int id, String token)unregister agent with specified id from serverStringupdateAgentParameteres(String serializedAgentDetails)This method is called by build agent to update it's parameters on server.-
Methods inherited from class jetbrains.buildServer.serverSide.impl.BaseXmlRpcServer
clearRedirects, setRedirect, start, stop, subscribeOnRequests
-
-
-
-
Field Detail
-
BUILD_RPC_CALL_AUTH_ENABLED
public static final String BUILD_RPC_CALL_AUTH_ENABLED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XmlRpcBasedServer
public XmlRpcBasedServer(@NotNull BuildAgentMessagesQueue messagesQueue, @NotNull XmlRpcSessionHolder sessionHolder, @NotNull ServerResponsibility serverResponsibility, @NotNull TeamCityNodes teamCityNodes, @NotNull DetachedBuildTracker detachedBuildTracker)
-
-
Method Detail
-
setBuildAgentManager
public void setBuildAgentManager(BuildAgentManagerEx buildAgentManager)
-
setBuildAgentFactory
public void setBuildAgentFactory(BuildAgentFactory buildAgentFactory)
-
setRunningBuildsManager
public void setRunningBuildsManager(RunningBuildsManagerEx runningBuildsManager)
-
setAgentPersister
public void setAgentPersister(AgentPersister agentPersister)
-
ping
public boolean ping()
Description copied from interface:ServerThis method is called by build agent to check if build server reachable
-
updateAgentParameteres
@NotNull public String updateAgentParameteres(@NotNull String serializedAgentDetails)
Description copied from interface:ServerThis method is called by build agent to update it's parameters on server. Build agent parameters may be changed by plugins and thus needed to be updated in server model- Specified by:
updateAgentParameteresin interfaceServer- Parameters:
serializedAgentDetails- serialized agent details- Returns:
- empty string
-
unregister
public boolean unregister(int id)
- Specified by:
unregisterin interfaceServer- Parameters:
id- id obtained via#registerAgent3call- Returns:
- true deprecated since 2021.2, use unregister(id, token) instead of it
-
unregister
public boolean unregister(int id, @Nullable String token)Description copied from interface:Serverunregister agent with specified id from server- Specified by:
unregisterin interfaceServer- Parameters:
id- agent idtoken- agent token. If the token isn't equal to token for the agent on server-side, server won't unregister the agent
-
log
public boolean log(@NotNull String buildId, Vector messagesXml)- Specified by:
login interfaceAgentLogListener- Parameters:
buildId- - build idmessagesXml- - message in XML format- Returns:
- - returns value which indicates, whether this message was accepted by server; if false, no other messages with given buildId should be sent for corresponding buildId
-
buildInterrupted
public boolean buildInterrupted(String buildId)
Description copied from interface:AgentLogListenerSame asAgentLogListener.buildInterrupted(String, String, boolean)with parameters: build, "", true- Specified by:
buildInterruptedin interfaceAgentLogListener- Parameters:
buildId- - build id- Returns:
- - fake return type to conform XML-RPC requirements
-
buildInterrupted
public boolean buildInterrupted(@NotNull String buildId, @NotNull String comment, boolean needRequeue)- Specified by:
buildInterruptedin interfaceAgentLogListenercomment- a comment to interrupt the build withneedRequeue- if true, build should be re-added to the build queue- Returns:
- fake value, to conform XML-RPC requirements
-
buildFinished
public boolean buildFinished(@NotNull String buildId, Date finishDate, boolean buildFailed)- Specified by:
buildFinishedin interfaceAgentLogListener- Parameters:
buildId- - build idfinishDate- - finish datebuildFailed- - build failed sign- Returns:
- - fake return type to conform XML-RPC requirements
-
buildDetachedFromAgent
public boolean buildDetachedFromAgent(String buildId, String lastStepId)
Description copied from interface:AgentLogListenerIndicates that the build tasks are finished on the agent but the build itself should continue until some external process finishes it- Specified by:
buildDetachedFromAgentin interfaceAgentLogListener- Parameters:
buildId- - build idlastStepId- - id of last step- Returns:
- - fake return type to conform XML-RPC requirements
-
patchApplied
public boolean patchApplied(String buildId)
Deprecated.left for compatibility with old agents- Parameters:
buildId- buildId- Returns:
- fake
-
isBuildFailing
public boolean isBuildFailing(String buildId)
Description copied from interface:AgentLogListenerChecks for build status on the build server. The call is synchronous, it makes sure that previous logged messages are sent to the server.- Specified by:
isBuildFailingin interfaceAgentLogListener- Returns:
- true if build status on the server is failing
-
markCheckoutDirClean
@Deprecated public boolean markCheckoutDirClean(String buildId)
Deprecated.left for compatibility with old agents
-
beginPatchApplying
public boolean beginPatchApplying(String buildId)
Deprecated.left for compatibility with old agents- Parameters:
buildId- buildId- Returns:
- fake
-
markCheckoutDirDirty
@Deprecated public boolean markCheckoutDirDirty(String buildId)
Deprecated.left for compatibility with old agents
-
projectTemporarilyUnavailableOnTheCurrentNode
public static boolean projectTemporarilyUnavailableOnTheCurrentNode(@NotNull SRunningBuild build)
-
-