Search in sources :

Example 6 with ConsumerOperationParameters

use of org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters in project gradle by gradle.

the class DefaultModelBuilder method get.

public void get(final ResultHandler<? super T> handler) throws IllegalStateException {
    final ConsumerOperationParameters operationParameters = getConsumerOperationParameters();
    connection.run(new ConsumerAction<T>() {

        public ConsumerOperationParameters getParameters() {
            return operationParameters;
        }

        public T run(ConsumerConnection connection) {
            T model = connection.run(modelType, operationParameters);
            return model;
        }
    }, new ResultHandlerAdapter<T>(handler));
}
Also used : ConsumerOperationParameters(org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters) ConsumerConnection(org.gradle.tooling.internal.consumer.connection.ConsumerConnection)

Aggregations

ConsumerOperationParameters (org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters)6 ConsumerConnection (org.gradle.tooling.internal.consumer.connection.ConsumerConnection)4 BuildCancellationToken (org.gradle.initialization.BuildCancellationToken)1 ListenerManager (org.gradle.internal.event.ListenerManager)1 ProgressLogger (org.gradle.internal.logging.progress.ProgressLogger)1 TestExecutionException (org.gradle.tooling.TestExecutionException)1 InternalBuildProgressListener (org.gradle.tooling.internal.protocol.InternalBuildProgressListener)1