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 String
BUILD_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 boolean
beginPatchApplying(String buildId)
Deprecated.left for compatibility with old agentsboolean
buildDetachedFromAgent(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 itboolean
buildFinished(String buildId, Date finishDate, boolean buildFailed)
boolean
buildInterrupted(String buildId)
Same asAgentLogListener.buildInterrupted(String, String, boolean)
with parameters: build, "", trueboolean
buildInterrupted(String buildId, String comment, boolean needRequeue)
boolean
isBuildFailing(String buildId)
Checks for build status on the build server.boolean
log(String buildId, Vector messagesXml)
boolean
markCheckoutDirClean(String buildId)
Deprecated.left for compatibility with old agentsboolean
markCheckoutDirDirty(String buildId)
Deprecated.left for compatibility with old agentsboolean
patchApplied(String buildId)
Deprecated.left for compatibility with old agentsboolean
ping()
This method is called by build agent to check if build server reachablestatic boolean
projectTemporarilyUnavailableOnTheCurrentNode(SRunningBuild build)
void
setAgentPersister(AgentPersister agentPersister)
void
setBuildAgentFactory(BuildAgentFactory buildAgentFactory)
void
setBuildAgentManager(BuildAgentManagerEx buildAgentManager)
void
setRunningBuildsManager(RunningBuildsManagerEx runningBuildsManager)
boolean
unregister(int id)
boolean
unregister(int id, String token)
unregister agent with specified id from serverString
updateAgentParameteres(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:Server
This method is called by build agent to check if build server reachable
-
updateAgentParameteres
@NotNull public String updateAgentParameteres(@NotNull String serializedAgentDetails)
Description copied from interface:Server
This 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:
updateAgentParameteres
in interfaceServer
- Parameters:
serializedAgentDetails
- serialized agent details- Returns:
- empty string
-
unregister
public boolean unregister(int id)
- Specified by:
unregister
in interfaceServer
- Parameters:
id
- id obtained via#registerAgent3
call- 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:Server
unregister agent with specified id from server- Specified by:
unregister
in 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:
log
in 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:AgentLogListener
Same asAgentLogListener.buildInterrupted(String, String, boolean)
with parameters: build, "", true- Specified by:
buildInterrupted
in 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:
buildInterrupted
in interfaceAgentLogListener
comment
- 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:
buildFinished
in 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:AgentLogListener
Indicates that the build tasks are finished on the agent but the build itself should continue until some external process finishes it- Specified by:
buildDetachedFromAgent
in 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:AgentLogListener
Checks 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:
isBuildFailing
in 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)
-
-