Package java.util.concurrent

Examples of java.util.concurrent.Executor.execute()


    @Override
    public void start(final Runnable run) {
        Executor executor = asyncExecutor();
        final CompositeThreadSetupAction setup = servletRequestContext.getDeployment().getThreadSetupAction();
        executor.execute(new Runnable() {
            @Override
            public void run() {
                ThreadSetupAction.Handle handle = setup.setup(null);
                try {
                    run.run();
View Full Code Here


                } else {
                    Executor executor = exchange.getDispatchExecutor();
                    if (executor == null) {
                        executor = exchange.getConnection().getWorker();
                    }
                    executor.execute(this);
                }
            }
        } else if(exchange.isUpgrade() && exchange.getConnection().getExtraBytes() != null) {
            //if this is a HTTP upgrade request and there are extra bytes make the extra bytes available
            StreamSourceConduit conduit = connection.getChannel().getSourceChannel().getConduit();
View Full Code Here

      Executor e = getThreadPool();
      if (e == null)
      {
         e = Executors.newSingleThreadExecutor();
      }
      e.execute(future);
      return future;
   }

   @Override
   public Future<SerializableStateTransferResult> getServiceState(String serviceName)
View Full Code Here

      Executor e = getThreadPool();
      if (e == null)
      {
         e = Executors.newSingleThreadExecutor();
      }
      e.execute(future);
      return future;
   }

   @Override
   public void registerStateTransferProvider(String serviceName, StateTransferProvider provider)
View Full Code Here

        }
        Executor e = getThreadPool();
        if (e == null) {
            e = Executors.newSingleThreadExecutor();
        }
        e.execute(future);
        return future;
    }

    @Override
    public void registerStateTransferProvider(String serviceName, StateTransferProvider provider) {
View Full Code Here

        }
        Executor e = getThreadPool();
        if (e == null) {
            e = Executors.newSingleThreadExecutor();
        }
        e.execute(future);
        return future;
    }

    @Override
    public Future<SerializableStateTransferResult> getServiceState(String serviceName) {
View Full Code Here

                        this.notifyAll();
                    }
                }
            };
            synchronized (o) {
                executor.execute(o);
                if (!o.isDone()) {
                    try {
                        o.wait();
                    } catch (InterruptedException e) {
                        //IGNORE
View Full Code Here

                    }
                    Executor executor = exchange.getDispatchExecutor();
                    if (executor == null) {
                        executor = exchange.getConnection().getWorker();
                    }
                    executor.execute(this);
                }
            }
        } else if (!exchange.isPersistent()) {
            IoUtils.safeClose(connection);
        } else if (exchange.isUpgrade()) {
View Full Code Here

    @Override
    public void start(final Runnable run) {
        Executor executor = asyncExecutor();
        final CompositeThreadSetupAction setup = servletRequestContext.getDeployment().getThreadSetupAction();
        executor.execute(new Runnable() {
            @Override
            public void run() {
                ThreadSetupAction.Handle handle = setup.setup(null);
                try {
                    run.run();
View Full Code Here

                Executor executor = exchange.getDispatchExecutor();
                exchange.setDispatchExecutor(null);
                exchange.unDispatch();
                if (dispatchTask != null) {
                    executor = executor == null ? exchange.getConnection().getWorker() : executor;
                    executor.execute(dispatchTask);
                }
            } else if (!resumed) {
                exchange.endExchange();
            }
        } catch (Throwable t) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.