org.gradle.tooling.CancellationToken Java Examples

The following examples show how to use org.gradle.tooling.CancellationToken. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConsumerOperationParameters.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private ConsumerOperationParameters(ConnectionParameters parameters, OutputStream stdout, OutputStream stderr, InputStream stdin,
                                    File javaHome, List<String> jvmArguments, List<String> arguments, List<String> tasks,
                                    List<InternalLaunchable> launchables, ProgressListenerAdapter listener, CancellationToken cancellationToken) {
    this.parameters = parameters;
    this.stdout = stdout;
    this.stderr = stderr;
    this.stdin = stdin;
    this.javaHome = javaHome;
    this.jvmArguments = jvmArguments;
    this.arguments = arguments;
    this.tasks = tasks;
    this.launchables = launchables;
    this.progressListener = listener;
    this.cancellationToken = cancellationToken;
}
 
Example #2
Source File: GradleProjectCache.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static BuildActionExecuter<NbProjectInfo> createInfoAction(ProjectConnection pconn, GradleCommandLine cmd, CancellationToken token, ProgressListener pl) {
    BuildActionExecuter<NbProjectInfo> ret = pconn.action(new NbProjectInfoAction());
    cmd.configure(ret);

    if (token != null) {
        ret.withCancellationToken(token);
    }

    if (pl != null) {
        ret.addProgressListener(pl);
    }
    return ret;
}
 
Example #3
Source File: ConsumerOperationParameters.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private ConsumerOperationParameters(ConnectionParameters parameters, OutputStream stdout, OutputStream stderr, InputStream stdin,
                                    File javaHome, List<String> jvmArguments, List<String> arguments, List<String> tasks,
                                    List<InternalLaunchable> launchables, ProgressListenerAdapter listener, CancellationToken cancellationToken) {
    this.parameters = parameters;
    this.stdout = stdout;
    this.stderr = stderr;
    this.stdin = stdin;
    this.javaHome = javaHome;
    this.jvmArguments = jvmArguments;
    this.arguments = arguments;
    this.tasks = tasks;
    this.launchables = launchables;
    this.progressListener = listener;
    this.cancellationToken = cancellationToken;
}
 
Example #4
Source File: ConsumerOperationParameters.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void setCancellationToken(CancellationToken cancellationToken) {
    this.cancellationToken = cancellationToken;
}
 
Example #5
Source File: AbstractLongRunningOperation.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public LongRunningOperation withCancellationToken(CancellationToken cancellationToken) {
    operationParamsBuilder.setCancellationToken(Preconditions.checkNotNull(cancellationToken));
    return getThis();
}
 
Example #6
Source File: DefaultCancellationTokenSource.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public CancellationToken token() {
    return tokenImpl;
}
 
Example #7
Source File: ConsumerOperationParameters.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void setCancellationToken(CancellationToken cancellationToken) {
    this.cancellationToken = cancellationToken;
}
 
Example #8
Source File: AbstractLongRunningOperation.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public LongRunningOperation withCancellationToken(CancellationToken cancellationToken) {
    operationParamsBuilder.setCancellationToken(Preconditions.checkNotNull(cancellationToken));
    return getThis();
}
 
Example #9
Source File: DefaultCancellationTokenSource.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public CancellationToken token() {
    return tokenImpl;
}