jetbrains.buildServer.agent.runner
Interface MultiCommandBuildSession


public interface MultiCommandBuildSession

Represents multi-process build runner. The implementation of build runner may start any number of processes as it needed within one build step

Since:
7.0

Method Summary
 CommandExecution getNextCommand()
          This method is used to iterate through a dynamic list of processes that runner implementation is running.
 BuildFinishedStatus sessionFinished()
          This method is called after getNextCommand() loop is finished
 void sessionStarted()
          Called to notify start of the build session
 

Method Detail

sessionStarted

void sessionStarted()
                    throws RunBuildException
Called to notify start of the build session

Throws:
RunBuildException - implementation may throw exception to stop execution and mark build failed
Since:
7.0

getNextCommand

@Nullable
CommandExecution getNextCommand()
                                throws RunBuildException
This method is used to iterate through a dynamic list of processes that runner implementation is running. This method is called first after sessionStarted(). Than, core starts a process from returned CommandExecution data. When process is finished implementation calls the method once more. Than next process is started. Core would be repeated it until this method returns null or throws RunBuildException

Returns:
next process to execute or null to finish execution loop
Throws:
RunBuildException - implementation may throw exception to stop execution and mark build failed
Since:
7.0

sessionFinished

@Nullable
BuildFinishedStatus sessionFinished()
This method is called after getNextCommand() loop is finished

Returns:
final build runner execution status
Since:
7.0