org.springframework.scheduling.concurrent

## 类 DefaultManagedTaskScheduler

- java.lang.Object
- - org.springframework.scheduling.concurrent.ConcurrentTaskExecutor
  - - org.springframework.scheduling.concurrent.ConcurrentTaskScheduler
    - - org.springframework.scheduling.concurrent.DefaultManagedTaskScheduler

- 所有已实现的接口:
    Executor, org.springframework.beans.factory.InitializingBean, org.springframework.core.task.AsyncListenableTaskExecutor, org.springframework.core.task.AsyncTaskExecutor, org.springframework.core.task.TaskExecutor, SchedulingTaskExecutor, TaskScheduler

      public class DefaultManagedTaskScheduler
      extends ConcurrentTaskScheduler
      implements org.springframework.beans.factory.InitializingBean

  JNDI-based variant of `ConcurrentTaskScheduler`, performing a default lookup for JSR-236's "java:comp/DefaultManagedScheduledExecutorService" in a Java EE 7 environment.

  Note: This class is not strictly JSR-236 based; it can work with any regular `ScheduledExecutorService` that can be found in JNDI. The actual adapting to `ManagedScheduledExecutorService` happens in the base class `ConcurrentTaskScheduler` itself.

  从以下版本开始:
    4.0
  作者:
    Juergen Hoeller

- - ### 嵌套类概要

    - ### 从类继承的嵌套类/接口 org.springframework.scheduling.concurrent.ConcurrentTaskExecutor

      `ConcurrentTaskExecutor.ManagedTaskBuilder`

  - ### 字段概要

    - ### 从接口继承的字段 org.springframework.core.task.AsyncTaskExecutor

      `TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE`

  - ### 构造器概要

    构造器
    构造器和说明
    `DefaultManagedTaskScheduler()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `afterPropertiesSet()`
    `void` | `setJndiEnvironment(Properties jndiEnvironment)` Set the JNDI environment to use for JNDI lookups.
    `void` | `setJndiName(String jndiName)` Specify a JNDI name of the `Executor` to delegate to, replacing the default JNDI name "java:comp/DefaultManagedScheduledExecutorService".
    `void` | `setJndiTemplate(JndiTemplate jndiTemplate)` Set the JNDI template to use for JNDI lookups.
    `void` | `setResourceRef(boolean resourceRef)` Set whether the lookup occurs in a Java EE container, i.e. if the prefix "java:comp/env/" needs to be added if the JNDI name doesn't already contain it.

    - ### 从类继承的方法 org.springframework.scheduling.concurrent.ConcurrentTaskScheduler

      `schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay, setErrorHandler, setScheduledExecutor`

    - ### 从类继承的方法 org.springframework.scheduling.concurrent.ConcurrentTaskExecutor

      `execute, execute, getConcurrentExecutor, prefersShortLivedTasks, setConcurrentExecutor, setTaskDecorator, submit, submit, submitListenable, submitListenable`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### 从接口继承的方法 org.springframework.scheduling.TaskScheduler

      `schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay`

- - ### 构造器详细资料

    - #### DefaultManagedTaskScheduler

          public DefaultManagedTaskScheduler()

  - ### 方法详细资料

    - #### setJndiTemplate

          public void setJndiTemplate(JndiTemplate jndiTemplate)

      Set the JNDI template to use for JNDI lookups.
      另请参阅:
        `JndiAccessor.setJndiTemplate(org.springframework.jndi.JndiTemplate)`

    - #### setJndiEnvironment

          public void setJndiEnvironment(Properties jndiEnvironment)

      Set the JNDI environment to use for JNDI lookups.
      另请参阅:
        `JndiAccessor.setJndiEnvironment(java.util.Properties)`

    - #### setResourceRef

          public void setResourceRef(boolean resourceRef)

      Set whether the lookup occurs in a Java EE container, i.e. if the prefix "java:comp/env/" needs to be added if the JNDI name doesn't already contain it. PersistenceAnnotationBeanPostProcessor's default is "true".
      另请参阅:
        `JndiLocatorSupport.setResourceRef(boolean)`

    - #### setJndiName

          public void setJndiName(String jndiName)

      Specify a JNDI name of the `Executor` to delegate to, replacing the default JNDI name "java:comp/DefaultManagedScheduledExecutorService".

      This can either be a fully qualified JNDI name, or the JNDI name relative to the current environment naming context if "resourceRef" is set to "true".

      另请参阅:
        `ConcurrentTaskExecutor.setConcurrentExecutor(java.util.concurrent.Executor)`, `setResourceRef(boolean)`

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws NamingException

      指定者:
        `afterPropertiesSet` 在接口中 `org.springframework.beans.factory.InitializingBean`
      抛出:
        `NamingException`