com.amazonaws.services.simpleworkflow.flow.worker
Class ActivityTaskPoller
java.lang.Object
com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller
com.amazonaws.services.simpleworkflow.flow.worker.ActivityTaskPoller
- All Implemented Interfaces:
- TaskPoller
public class ActivityTaskPoller
- extends SynchronousActivityTaskPoller
Methods inherited from class com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller |
getActivityImplementationFactory, getDomain, getIdentity, getPollTaskList, getReportCompletionRetryParameters, getReportFailureRetryParameters, getService, getTaskListToPoll, poll, setActivityImplementationFactory, setDomain, setIdentity, setReportCompletionRetryParameters, setReportFailureRetryParameters, setService, setTaskListToPoll |
ActivityTaskPoller
public ActivityTaskPoller(AmazonSimpleWorkflow service,
String domain,
String pollTaskList,
ActivityImplementationFactory activityImplementationFactory,
ThreadPoolExecutor taskExecutorService)
getTaskExecutorService
public ExecutorService getTaskExecutorService()
setTaskExecutorService
public void setTaskExecutorService(ThreadPoolExecutor taskExecutorService)
pollAndProcessSingleTask
public boolean pollAndProcessSingleTask()
throws Exception
- Poll for a activity task and execute correspondent implementation using
provided executor service.
- Specified by:
pollAndProcessSingleTask
in interface TaskPoller
- Overrides:
pollAndProcessSingleTask
in class SynchronousActivityTaskPoller
- Returns:
- true if task was polled and decided upon, false if poll timed out
- Throws:
Exception
shutdown
public void shutdown()
- Specified by:
shutdown
in interface TaskPoller
- Overrides:
shutdown
in class SynchronousActivityTaskPoller
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNow
in interface TaskPoller
- Overrides:
shutdownNow
in class SynchronousActivityTaskPoller
awaitTermination
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
awaitTermination
in interface TaskPoller
- Overrides:
awaitTermination
in class SynchronousActivityTaskPoller
- Throws:
InterruptedException
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.