Package org.gradle.messaging.remote

Examples of org.gradle.messaging.remote.ConnectionAcceptor


            lock.unlock();
        }
    }

    public void onConnect(ObjectConnection connection) {
        ConnectionAcceptor stoppable;

        lock.lock();
        try {
            LOGGER.debug("Received connection {} from {}", connection, execHandle);
            this.connection = connection;
            condition.signalAll();
            stoppable = acceptor;
        } finally {
            lock.unlock();
        }

        stoppable.requestStop();
    }
View Full Code Here


            if (getWorker() == null) {
                throw new IllegalStateException("No worker action specified for this worker process.");
            }

            final DefaultWorkerProcess workerProcess = new DefaultWorkerProcess(120, TimeUnit.SECONDS);
            ConnectionAcceptor acceptor = server.accept(new Action<ObjectConnection>() {
                public void execute(ObjectConnection connection) {
                    workerProcess.onConnect(connection);
                }
            });
            workerProcess.startAccepting(acceptor);
            Address localAddress = acceptor.getAddress();

            // Build configuration for GradleWorkerMain
            List<URL> implementationClassPath = ClasspathUtil.getClasspath(getWorker().getClass().getClassLoader());
            Object id = idGenerator.generateId();
            String displayName = getBaseName() + " " + id;
View Full Code Here

        LOGGER.debug("Listening on {}.", address);

        final StoppableExecutor executor = executorFactory.create(String.format("Incoming %s TCP Connector on port %s", allowRemote ? "remote" : "local", localPort));
        executor.execute(new Receiver(serverSocket, action, allowRemote));

        return new ConnectionAcceptor() {
            public Address getAddress() {
                return address;
            }

            public void requestStop() {
View Full Code Here

TOP

Related Classes of org.gradle.messaging.remote.ConnectionAcceptor

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.