Package org.gradle.process.internal

Examples of org.gradle.process.internal.WorkerProcess


public class AntlrWorkerManager {

    public AntlrResult runWorker(File workingDir, Factory<WorkerProcessBuilder> workerFactory, FileCollection antlrClasspath, AntlrSpec spec) {

        WorkerProcess process = createWorkerProcess(workingDir, workerFactory, antlrClasspath, spec);
        process.start();

        AntlrWorkerClient clientCallBack = new AntlrWorkerClient();
        process.getConnection().addIncoming(AntlrWorkerClientProtocol.class, clientCallBack);
        process.getConnection().connect();

        process.waitForStop();

        return clientCallBack.getResult();
    }
View Full Code Here


        JavaExecHandleBuilder javaCommand = builder.getJavaCommand();
        javaCommand.setMinHeapSize(forkOptions.getMinHeapSize());
        javaCommand.setMaxHeapSize(forkOptions.getMaxHeapSize());
        javaCommand.setJvmArgs(forkOptions.getJvmArgs());
        javaCommand.setWorkingDir(workingDir);
        WorkerProcess process = builder.worker(new CompilerDaemonServer()).setBaseName("Gradle Compiler Daemon").build();
        process.start();

        CompilerDaemonServerProtocol server = process.getConnection().addOutgoing(CompilerDaemonServerProtocol.class);
        CompilerDaemonClient client = new CompilerDaemonClient(forkOptions, process, server);
        process.getConnection().addIncoming(CompilerDaemonClientProtocol.class, client);
        process.getConnection().connect();

        LOG.info("Started Gradle compiler daemon ({}) with fork options {}.", clock.getTime(), forkOptions);

        return client;
    }
View Full Code Here

        JavaExecHandleBuilder javaCommand = builder.getJavaCommand();
        if (javaExecSpecAction != null) {
            javaExecSpecAction.execute(javaCommand);
        }

        WorkerProcess workerProcess = builder.worker(new RhinoServer<R, P>(workerSpec)).build();
        return new DefaultRhinoWorkerHandle<R, P>(workerSpec.getResultType(), workerProcess);
    }
View Full Code Here

TOP

Related Classes of org.gradle.process.internal.WorkerProcess

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.