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 StringmyMethodPrefixprotected XmlRpcTargetmyTarget
-
Constructor Summary
Constructors Modifier Constructor Description XmlRpcAgentLogListener(int localPort)This constructor must be used in runtime only, i.e.protectedXmlRpcAgentLogListener(String serverUrl, int connectionTimeout, KeyStore trustStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbuildDetachedFromAgent(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)StringtoString()
-
-
-
Field Detail
-
myTarget
protected volatile XmlRpcTarget myTarget
-
myMethodPrefix
protected final String myMethodPrefix
-
-
Method Detail
-
log
public boolean log(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
-
buildFinished
public boolean buildFinished(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
-
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(String buildId, 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
-
isBuildFailing
public boolean isBuildFailing(String buildId) throws InterruptedException
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
- Throws:
InterruptedException- if action was removed from the queue for some reason, and could not be completed (for instance, build is obsolete)
-
-