public class SimpleExecutorContext extends AbstractExecutorContext implements ExecutorContext
executorContext
that uses
one thread per each executorDEFAULT_TIMEOUT, DEFAULT_TIMEUNIT
Constructor and Description |
---|
SimpleExecutorContext() |
SimpleExecutorContext(int lifeCycleThreadCount,
int apiThreadCount,
int callbackThreadCount,
int scheduledThreadCount) |
Modifier and Type | Method and Description |
---|---|
ExecutorService |
getApiExecutor()
Executes user API calls to SDK client.
|
ExecutorService |
getCallbackExecutor()
Executes callback methods provided by SDK client user.
|
ExecutorService |
getLifeCycleExecutor()
Executes lifecycle events/commands of Kaa client
|
ScheduledExecutorService |
getScheduledExecutor()
Executes scheduled tasks(periodically if needed) as log upload
|
void |
init()
Initialize executors
|
void |
stop()
Stops executors
|
getTimeout, getTimeunit, shutdownExecutor
public SimpleExecutorContext()
public SimpleExecutorContext(int lifeCycleThreadCount, int apiThreadCount, int callbackThreadCount, int scheduledThreadCount)
public void init()
ExecutorContext
init
in interface ExecutorContext
public void stop()
ExecutorContext
stop
in interface ExecutorContext
public ExecutorService getLifeCycleExecutor()
ExecutorContext
getLifeCycleExecutor
in interface ExecutorContext
public ExecutorService getApiExecutor()
ExecutorContext
getApiExecutor
in interface ExecutorContext
public ExecutorService getCallbackExecutor()
ExecutorContext
getCallbackExecutor
in interface ExecutorContext
public ScheduledExecutorService getScheduledExecutor()
ExecutorContext
getScheduledExecutor
in interface ExecutorContext
Copyright © 2016. All rights reserved.