public class ActivityTaskPoller extends SynchronousActivityTaskPoller
Constructor and Description |
---|
ActivityTaskPoller(AmazonSimpleWorkflow service,
String domain,
String pollTaskList,
ActivityImplementationFactory activityImplementationFactory,
ThreadPoolExecutor taskExecutorService) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
ExecutorService |
getTaskExecutorService() |
boolean |
pollAndProcessSingleTask()
Poll for a activity task and execute correspondent implementation using
provided executor service.
|
void |
setTaskExecutorService(ThreadPoolExecutor taskExecutorService) |
void |
shutdown() |
void |
shutdownNow() |
getActivityImplementationFactory, getDomain, getIdentity, getPollTaskList, getReportCompletionRetryParameters, getReportFailureRetryParameters, getService, getTaskListToPoll, poll, setActivityImplementationFactory, setDomain, setIdentity, setReportCompletionRetryParameters, setReportFailureRetryParameters, setService, setTaskListToPoll
public ActivityTaskPoller(AmazonSimpleWorkflow service, String domain, String pollTaskList, ActivityImplementationFactory activityImplementationFactory, ThreadPoolExecutor taskExecutorService)
public ExecutorService getTaskExecutorService()
public void setTaskExecutorService(ThreadPoolExecutor taskExecutorService)
public boolean pollAndProcessSingleTask() throws Exception
pollAndProcessSingleTask
in interface TaskPoller
pollAndProcessSingleTask
in class SynchronousActivityTaskPoller
Exception
public void shutdown()
shutdown
in interface TaskPoller
shutdown
in class SynchronousActivityTaskPoller
public void shutdownNow()
shutdownNow
in interface TaskPoller
shutdownNow
in class SynchronousActivityTaskPoller
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface TaskPoller
awaitTermination
in class SynchronousActivityTaskPoller
InterruptedException
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.