Package org.springframework.core.task.support

Examples of org.springframework.core.task.support.TaskExecutorAdapter


      }
      if (executor instanceof AsyncTaskExecutor) {
        this.executors.put(method, (AsyncTaskExecutor) executor);
      }
      else if (executor != null) {
        this.executors.put(method, new TaskExecutorAdapter(executor));
      }
    }
    return this.executors.get(method);
  }
View Full Code Here


      this.concurrentExecutor = concurrentExecutor;
      if (managedExecutorServiceClass != null && managedExecutorServiceClass.isInstance(concurrentExecutor)) {
        this.adaptedExecutor = new ManagedTaskExecutorAdapter(concurrentExecutor);
      }
      else {
        this.adaptedExecutor = new TaskExecutorAdapter(concurrentExecutor);
      }
    }
    else {
      this.concurrentExecutor = Executors.newSingleThreadExecutor();
      this.adaptedExecutor = new TaskExecutorAdapter(this.concurrentExecutor);
    }
  }
View Full Code Here

      }
      else if (executorToUse == null) {
        return null;
      }
      executor = (executorToUse instanceof AsyncListenableTaskExecutor ?
          (AsyncListenableTaskExecutor) executorToUse : new TaskExecutorAdapter(executorToUse));
      this.executors.put(method, executor);
    }
    return executor;
  }
View Full Code Here

   * Specify the JDK 1.5 concurrent executor to delegate to.
   */
  public final void setConcurrentExecutor(Executor concurrentExecutor) {
    this.concurrentExecutor =
        (concurrentExecutor != null ? concurrentExecutor : Executors.newSingleThreadExecutor());
    this.adaptedExecutor = new TaskExecutorAdapter(this.concurrentExecutor);
  }
View Full Code Here

   * Create a new AsyncExecutionInterceptor.
   * @param asyncExecutor the <code>java.util.concurrent</code> Executor
   * to delegate to (typically a {@link java.util.concurrent.ExecutorService}
   */
  public AsyncExecutionInterceptor(Executor asyncExecutor) {
    this.asyncExecutor = new TaskExecutorAdapter(asyncExecutor);
  }
View Full Code Here

TOP

Related Classes of org.springframework.core.task.support.TaskExecutorAdapter

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.