public class ClientCommandExecutor<C extends ClientContext> extends java.util.concurrent.ThreadPoolExecutor implements ClientObject<C>
ClientCommand
s.
It queues up to 100 commands without blocking. The ClientCommand
s are cancellable by the user.java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
ClientCommandExecutor(C clientCtx) |
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() |
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
public ClientCommandExecutor(C clientCtx)
public final C getClientContext()
ClientObject
getClientContext
in interface ClientObject<C extends ClientContext>
public final void put(ClientCommand cmd)
public java.lang.String toString()
toString
in class java.util.concurrent.ThreadPoolExecutor
Copyright © 2014 EsprIT-Systems. All Rights Reserved.