Package org.gradle.launcher.daemon.protocol

Examples of org.gradle.launcher.daemon.protocol.Command


* If an action of this type receives a command that is not Build it will throw an exception.
*/
abstract public class BuildCommandOnly implements DaemonCommandAction {

    public void execute(DaemonCommandExecution execution) {
        Command command = execution.getCommand();
        if (!(command instanceof Build)) {
            throw new IllegalStateException(String.format("{} command action received a command that isn't Build (command is {}), this shouldn't happen", this.getClass(), command.getClass()));
        }

        doBuild(execution, (Build)command);
    }
View Full Code Here


        private void receiveAndHandleCommand() {
            try {
                DefaultDaemonConnection daemonConnection = new DefaultDaemonConnection(connection, executorFactory);
                try {
                    Command command = receiveCommand(daemonConnection);
                    if (command != null) {
                        handleCommand(command, daemonConnection);
                    }
                } finally {
                    daemonConnection.stop();
View Full Code Here

            }
        }

        private Command receiveCommand(DaemonConnection daemonConnection) {
            try {
                Command command = (Command) daemonConnection.receive(120, TimeUnit.SECONDS);
                LOGGER.info("Received command: {}.", command);
                return command;
            } catch (Throwable e) {
                LOGGER.warn(String.format("Unable to receive command from %s. Dispatching the failure to the daemon client", connection), e);
                daemonConnection.completed(new DaemonFailure(e));
View Full Code Here

TOP

Related Classes of org.gradle.launcher.daemon.protocol.Command

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.