org.jbpm.executor.impl

## Class ExecutorServiceImpl

- java.lang.Object
- - org.jbpm.executor.impl.ExecutorServiceImpl

- All Implemented Interfaces:
    RequeueAware, org.kie.api.executor.ExecutorService

      public class ExecutorServiceImpl
      extends Object
      implements org.kie.internal.executor.api.ExecutorService, RequeueAware

  Entry point of the executor component. Application should always talk via this service to ensure all internals are properly initialized

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.kie.api.executor.ExecutorService

      `org.kie.api.executor.ExecutorService.IdProvider`

  - ### Field Summary

    - ### Fields inherited from interface org.kie.api.executor.ExecutorService

      `EXECUTOR_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExecutorServiceImpl()`
    `ExecutorServiceImpl(org.kie.api.executor.Executor executor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAsyncJobListener(AsynchronousJobListener listener)`
    `void` | `cancelRequest(Long requestId)`
    `int` | `clearAllErrors()`
    `int` | `clearAllRequests()`
    `void` | `destroy()`
    `org.kie.api.executor.ExecutorAdminService` | `getAdminService()`
    `List<org.kie.api.executor.ErrorInfo>` | `getAllErrors()`
    `List<org.kie.api.executor.ErrorInfo>` | `getAllErrors(org.kie.api.runtime.query.QueryContext queryContext)`
    `List<org.kie.api.executor.RequestInfo>` | `getAllRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getAllRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `List<AsynchronousJobListener>` | `getAsyncJobListeners()`
    `List<org.kie.api.executor.RequestInfo>` | `getCancelledRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getCancelledRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `List<org.kie.api.executor.RequestInfo>` | `getCompletedRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getCompletedRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `List<org.kie.api.executor.ErrorInfo>` | `getErrorsByRequestId(Long requestId)`
    `ExecutorEventSupport` | `getEventSupport()`
    `org.kie.api.executor.Executor` | `getExecutor()`
    `List<org.kie.api.executor.RequestInfo>` | `getFutureQueuedRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getFutureQueuedRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `List<org.kie.api.executor.RequestInfo>` | `getInErrorRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getInErrorRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `int` | `getInterval()`
    `List<org.kie.api.executor.RequestInfo>` | `getPendingRequestById(Long id)`
    `List<org.kie.api.executor.RequestInfo>` | `getPendingRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getPendingRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `org.kie.api.executor.ExecutorQueryService` | `getQueryService()`
    `List<org.kie.api.executor.RequestInfo>` | `getQueuedRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getQueuedRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `org.kie.api.executor.RequestInfo` | `getRequestById(Long requestId)`
    `List<org.kie.api.executor.RequestInfo>` | `getRequestsByBusinessKey(String businessKey, org.kie.api.runtime.query.QueryContext queryContext)`
    `List<org.kie.api.executor.RequestInfo>` | `getRequestsByCommand(String command, org.kie.api.runtime.query.QueryContext queryContext)`
    `List<org.kie.api.executor.RequestInfo>` | `getRequestsByStatus(List<org.kie.api.executor.STATUS> statuses)`
    `List<org.kie.api.executor.RequestInfo>` | `getRequestsByStatus(List<org.kie.api.executor.STATUS> statuses, org.kie.api.runtime.query.QueryContext queryContext)`
    `int` | `getRetries()`
    `List<org.kie.api.executor.RequestInfo>` | `getRunningRequests()`
    `List<org.kie.api.executor.RequestInfo>` | `getRunningRequests(org.kie.api.runtime.query.QueryContext queryContext)`
    `int` | `getThreadPoolSize()`
    `TimeUnit` | `getTimeunit()`
    `void` | `init()`
    `boolean` | `isActive()`
    `void` | `removeAsyncJobListener(AsynchronousJobListener listener)`
    `void` | `requeue(Long olderThan)` Moves `RequestInfo` instances that are in running state longer than given amount of time (in milliseconds)
    `void` | `requeueById(Long requestId)` Moves `RequestInfo` instance with given request id that are in running state
    `Long` | `scheduleRequest(String commandName, org.kie.api.executor.CommandContext ctx)`
    `Long` | `scheduleRequest(String commandId, Date date, org.kie.api.executor.CommandContext ctx)`
    `void` | `setAdminService(org.kie.api.executor.ExecutorAdminService adminService)`
    `void` | `setEventSupport(ExecutorEventSupport eventSupport)`
    `void` | `setExecutor(org.kie.api.executor.Executor executor)`
    `void` | `setInterval(int waitTime)`
    `void` | `setQueryService(org.kie.api.executor.ExecutorQueryService queryService)`
    `void` | `setRetries(int defaultNroOfRetries)`
    `void` | `setThreadPoolSize(int nroOfThreads)`
    `void` | `setTimeunit(TimeUnit timeunit)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### ExecutorServiceImpl

          public ExecutorServiceImpl()

    - #### ExecutorServiceImpl

          public ExecutorServiceImpl(org.kie.api.executor.Executor executor)

  - ### Method Detail

    - #### getEventSupport

          public ExecutorEventSupport getEventSupport()

    - #### setEventSupport

          public void setEventSupport(ExecutorEventSupport eventSupport)

    - #### getExecutor

          public org.kie.api.executor.Executor getExecutor()

    - #### setExecutor

          public void setExecutor(org.kie.api.executor.Executor executor)

    - #### getQueryService

          public org.kie.api.executor.ExecutorQueryService getQueryService()

    - #### setQueryService

          public void setQueryService(org.kie.api.executor.ExecutorQueryService queryService)

    - #### getAdminService

          public org.kie.api.executor.ExecutorAdminService getAdminService()

    - #### setAdminService

          public void setAdminService(org.kie.api.executor.ExecutorAdminService adminService)

    - #### getFutureQueuedRequests

          public List<org.kie.api.executor.RequestInfo> getFutureQueuedRequests()

    - #### getQueuedRequests

          public List<org.kie.api.executor.RequestInfo> getQueuedRequests()

    - #### getCompletedRequests

          public List<org.kie.api.executor.RequestInfo> getCompletedRequests()

    - #### getInErrorRequests

          public List<org.kie.api.executor.RequestInfo> getInErrorRequests()

    - #### getCancelledRequests

          public List<org.kie.api.executor.RequestInfo> getCancelledRequests()

    - #### getAllErrors

          public List<org.kie.api.executor.ErrorInfo> getAllErrors()

    - #### getAllRequests

          public List<org.kie.api.executor.RequestInfo> getAllRequests()

    - #### getRequestsByStatus

          public List<org.kie.api.executor.RequestInfo> getRequestsByStatus(List<org.kie.api.executor.STATUS> statuses)

    - #### clearAllRequests

          public int clearAllRequests()

      Specified by:
        `clearAllRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### clearAllErrors

          public int clearAllErrors()

      Specified by:
        `clearAllErrors` in interface `org.kie.api.executor.ExecutorService`

    - #### scheduleRequest

          public Long scheduleRequest(String commandName,
                                      org.kie.api.executor.CommandContext ctx)

      Specified by:
        `scheduleRequest` in interface `org.kie.api.executor.ExecutorService`

    - #### cancelRequest

          public void cancelRequest(Long requestId)

      Specified by:
        `cancelRequest` in interface `org.kie.api.executor.ExecutorService`

    - #### init

          public void init()

      Specified by:
        `init` in interface `org.kie.api.executor.ExecutorService`

    - #### destroy

          public void destroy()

      Specified by:
        `destroy` in interface `org.kie.api.executor.ExecutorService`

    - #### isActive

          public boolean isActive()

      Specified by:
        `isActive` in interface `org.kie.api.executor.ExecutorService`

    - #### getInterval

          public int getInterval()

      Specified by:
        `getInterval` in interface `org.kie.api.executor.ExecutorService`

    - #### setInterval

          public void setInterval(int waitTime)

      Specified by:
        `setInterval` in interface `org.kie.api.executor.ExecutorService`

    - #### getRetries

          public int getRetries()

      Specified by:
        `getRetries` in interface `org.kie.api.executor.ExecutorService`

    - #### setRetries

          public void setRetries(int defaultNroOfRetries)

      Specified by:
        `setRetries` in interface `org.kie.api.executor.ExecutorService`

    - #### getThreadPoolSize

          public int getThreadPoolSize()

      Specified by:
        `getThreadPoolSize` in interface `org.kie.api.executor.ExecutorService`

    - #### setThreadPoolSize

          public void setThreadPoolSize(int nroOfThreads)

      Specified by:
        `setThreadPoolSize` in interface `org.kie.api.executor.ExecutorService`

    - #### getTimeunit

          public TimeUnit getTimeunit()

      Specified by:
        `getTimeunit` in interface `org.kie.api.executor.ExecutorService`

    - #### setTimeunit

          public void setTimeunit(TimeUnit timeunit)

      Specified by:
        `setTimeunit` in interface `org.kie.api.executor.ExecutorService`

    - #### getPendingRequests

          public List<org.kie.api.executor.RequestInfo> getPendingRequests()

    - #### getPendingRequestById

          public List<org.kie.api.executor.RequestInfo> getPendingRequestById(Long id)

      Specified by:
        `getPendingRequestById` in interface `org.kie.api.executor.ExecutorService`

    - #### scheduleRequest

          public Long scheduleRequest(String commandId,
                                      Date date,
                                      org.kie.api.executor.CommandContext ctx)

      Specified by:
        `scheduleRequest` in interface `org.kie.api.executor.ExecutorService`

    - #### getRunningRequests

          public List<org.kie.api.executor.RequestInfo> getRunningRequests()

    - #### getRequestById

          public org.kie.api.executor.RequestInfo getRequestById(Long requestId)

      Specified by:
        `getRequestById` in interface `org.kie.api.executor.ExecutorService`

    - #### getErrorsByRequestId

          public List<org.kie.api.executor.ErrorInfo> getErrorsByRequestId(Long requestId)

      Specified by:
        `getErrorsByRequestId` in interface `org.kie.api.executor.ExecutorService`

    - #### getRequestsByBusinessKey

          public List<org.kie.api.executor.RequestInfo> getRequestsByBusinessKey(String businessKey,
                                                                                 org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getRequestsByBusinessKey` in interface `org.kie.api.executor.ExecutorService`

    - #### getRequestsByCommand

          public List<org.kie.api.executor.RequestInfo> getRequestsByCommand(String command,
                                                                             org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getRequestsByCommand` in interface `org.kie.api.executor.ExecutorService`

    - #### requeue

          public void requeue(Long olderThan)

      Description copied from interface: `RequeueAware`
      Moves `RequestInfo` instances that are in running state longer than given amount of time (in milliseconds)
      Specified by:
        `requeue` in interface `RequeueAware`
      Parameters:
        `olderThan` - amount of time in milliseconds from current time stamp

    - #### requeueById

          public void requeueById(Long requestId)

      Description copied from interface: `RequeueAware`
      Moves `RequestInfo` instance with given request id that are in running state
      Specified by:
        `requeueById` in interface `RequeueAware`
      Parameters:
        `requestId` - request unique identifier

    - #### getQueuedRequests

          public List<org.kie.api.executor.RequestInfo> getQueuedRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getQueuedRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### getCompletedRequests

          public List<org.kie.api.executor.RequestInfo> getCompletedRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getCompletedRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### getInErrorRequests

          public List<org.kie.api.executor.RequestInfo> getInErrorRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getInErrorRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### getCancelledRequests

          public List<org.kie.api.executor.RequestInfo> getCancelledRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getCancelledRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### getAllErrors

          public List<org.kie.api.executor.ErrorInfo> getAllErrors(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getAllErrors` in interface `org.kie.api.executor.ExecutorService`

    - #### getAllRequests

          public List<org.kie.api.executor.RequestInfo> getAllRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getAllRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### getRequestsByStatus

          public List<org.kie.api.executor.RequestInfo> getRequestsByStatus(List<org.kie.api.executor.STATUS> statuses,
                                                                            org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getRequestsByStatus` in interface `org.kie.api.executor.ExecutorService`

    - #### getPendingRequests

          public List<org.kie.api.executor.RequestInfo> getPendingRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getPendingRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### getRunningRequests

          public List<org.kie.api.executor.RequestInfo> getRunningRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getRunningRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### getFutureQueuedRequests

          public List<org.kie.api.executor.RequestInfo> getFutureQueuedRequests(org.kie.api.runtime.query.QueryContext queryContext)

      Specified by:
        `getFutureQueuedRequests` in interface `org.kie.api.executor.ExecutorService`

    - #### addAsyncJobListener

          public void addAsyncJobListener(AsynchronousJobListener listener)

    - #### removeAsyncJobListener

          public void removeAsyncJobListener(AsynchronousJobListener listener)

    - #### getAsyncJobListeners

          public List<AsynchronousJobListener> getAsyncJobListeners()

Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.