de.esprit.netsuite.client.activity.command

## Class ClientCommandExecutor<C extends ClientContext>

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - java.util.concurrent.ThreadPoolExecutor
    - - de.esprit.netsuite.client.activity.command.ClientCommandExecutor<C>

- All Implemented Interfaces:
    ClientObject<C>, java.util.concurrent.Executor, java.util.concurrent.ExecutorService

      public class ClientCommandExecutor<C extends ClientContext>
      extends java.util.concurrent.ThreadPoolExecutor
      implements ClientObject<C>

  This ThreadPool contains a single thread for executing asynchronous `ClientCommand`s. It queues up to 100 commands without blocking. The `ClientCommand`s are cancellable by the user.
  Author:
    Rainer Buesch

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor

      `java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientCommandExecutor(C clientCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `C` | `getClientContext()` Returns the the client runtime environment
    `void` | `put(ClientCommand cmd)` Puts a ClientCommand into the queue for execution.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.util.concurrent.ThreadPoolExecutor

      `afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated`

    - ### Methods inherited from class java.util.concurrent.AbstractExecutorService

      `invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit`

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

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

- - ### Constructor Detail

    - #### ClientCommandExecutor

          public ClientCommandExecutor(C clientCtx)

  - ### Method Detail

    - #### getClientContext

          public final C getClientContext()

      Description copied from interface: `ClientObject`
      Returns the the client runtime environment
      Specified by:
        `getClientContext` in interface `ClientObject<C extends ClientContext>`

    - #### put

          public final void put(ClientCommand cmd)

      Puts a ClientCommand into the queue for execution.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.util.concurrent.ThreadPoolExecutor`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.