Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.tooling
[Java] Interface BuildActionExecuter

    org.gradle.tooling.LongRunningOperation
      org.gradle.tooling.BuildActionExecuter

All Superinterfaces:
  LongRunningOperation

    @Incubating
    public interface BuildActionExecuter
    extends LongRunningOperation

Used to execute a BuildAction in the build process.

Parameters:
  `` - The type of result produced by this executer.

Since:
  1.8

Method Summary
`Object` | `run()` Runs the action, blocking until its result is available.
`void` | `run(ResultHandler handler)` Starts executing the action, passing the result to the given handler when complete.

Methods inherited from interface LongRunningOperation
addProgressListener, setJavaHome, setJvmArguments, setStandardError, setStandardInput, setStandardOutput, withArguments

Method Detail

### run

    public Object run()

  Runs the action, blocking until its result is available.
  throws:
    UnsupportedVersionException When the target Gradle version does not support build action execution.
  throws:
    UnsupportedOperationConfigurationException When the target Gradle version does not support some requested configuration option such as setStandardInput(java.io.InputStream), setJavaHome(java.io.File), setJvmArguments(String...).
  throws:
    UnsupportedBuildArgumentException When there is a problem with build arguments provided by withArguments(String...).
  throws:
    BuildActionFailureException When the build action fails with an exception.
  throws:
    BuildException On some failure executing the Gradle build.
  throws:
    GradleConnectionException On some other failure using the connection.
  throws:
    IllegalStateException When the connection has been closed or is closing.
  Since:
    1.8

### run

    public void run(ResultHandler handler)

  Starts executing the action, passing the result to the given handler when complete. This method returns immediately, and the result is later passed to the given handler's ResultHandler#onComplete(Object)#onComplete(Object) method.

  If the operation fails, the handler's ResultHandler#onFailure(GradleConnectionException)#onFailure(GradleConnectionException) method is called with the appropriate exception. See run() for a description of the various exceptions that the operation may fail with.

  throws:
    IllegalStateException When the connection has been closed or is closing.
  Parameters:
    `handler` - The handler to supply the result to.
  Since:
    1.8

Gradle API 1.10