Package jetbrains.buildServer.agent.impl
Class XmlRpcAgentLogListener
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.XmlRpcAgentLogListener
-
- All Implemented Interfaces:
AgentLogListener
public class XmlRpcAgentLogListener extends Object implements AgentLogListener
-
-
Field Summary
Fields Modifier and Type Field Description protected String
myMethodPrefix
protected XmlRpcTarget
myTarget
-
Constructor Summary
Constructors Modifier Constructor Description XmlRpcAgentLogListener(int localPort)
This constructor must be used in runtime only, i.e.protected
XmlRpcAgentLogListener(String serverUrl, int connectionTimeout, KeyStore trustStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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)
String
toString()
-
-
-
Field Detail
-
myTarget
protected volatile XmlRpcTarget myTarget
-
myMethodPrefix
protected final String myMethodPrefix
-
-
Method Detail
-
log
public boolean log(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
-
buildFinished
public boolean buildFinished(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
-
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(String buildId, 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
-
isBuildFailing
public boolean isBuildFailing(String buildId) throws InterruptedException
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
- Throws:
InterruptedException
- if action was removed from the queue for some reason, and could not be completed (for instance, build is obsolete)
-
-