com.amazonaws.services.simpleworkflow.flow.spring
Class SpringActivityWorker

java.lang.Object
  extended by com.amazonaws.services.simpleworkflow.flow.spring.SpringActivityWorker
All Implemented Interfaces:
Suspendable, SuspendableWorker, WorkerBase, WorkerLifecycle, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class SpringActivityWorker
extends Object
implements WorkerBase, org.springframework.context.SmartLifecycle


Constructor Summary
SpringActivityWorker()
           
SpringActivityWorker(AmazonSimpleWorkflow service, String domain, String taskListToPoll)
           
 
Method Summary
 List<ActivityType> addActivitiesImplementation(Object activitiesImplementation)
           
 boolean awaitTermination(long timeout, TimeUnit unit)
           
 Iterable<Object> getActivitiesImplementations()
           
 DataConverter getDataConverter()
           
 String getDomain()
           
 long getDomainRetentionPeriodInDays()
           
 String getIdentity()
           
 int getMaximumPollRateIntervalMilliseconds()
           
 double getMaximumPollRatePerSecond()
           
 int getPhase()
           
 double getPollBackoffCoefficient()
           
 long getPollBackoffInitialInterval()
           
 long getPollBackoffMaximumInterval()
           
 int getPollThreadCount()
           
 AmazonSimpleWorkflow getService()
           
 int getTaskExecutorThreadPoolSize()
           
 String getTaskListToPoll()
           
 long getTerminationTimeoutSeconds()
           
 Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
           
 boolean isAutoStartup()
           
 boolean isDisableAutoStartup()
           
 boolean isDisableServiceShutdownOnStop()
           
 boolean isRegisterDomain()
           
 boolean isRunning()
           
 void registerTypesToPoll()
           
 void resumePolling()
           
 void setActivitiesImplementations(Iterable<Object> activitiesImplementations)
           
 void setDataConverter(DataConverter dataConverter)
           
 void setDisableAutoStartup(boolean disableAutoStartup)
           
 void setDisableServiceShutdownOnStop(boolean disableServiceShutdownOnStop)
           
 void setDomain(String domain)
           
 void setDomainRetentionPeriodInDays(long domainRetentionPeriodInDays)
           
 void setIdentity(String identity)
           
 void setMaximumPollRateIntervalMilliseconds(int maximumPollRateIntervalMilliseconds)
           
 void setMaximumPollRatePerSecond(double maximumPollRatePerSecond)
           
 void setPhase(int startPhase)
           
 void setPollBackoffCoefficient(double backoffCoefficient)
           
 void setPollBackoffInitialInterval(long backoffInitialInterval)
           
 void setPollBackoffMaximumInterval(long backoffMaximumInterval)
           
 void setPollThreadCount(int threadCount)
           
 void setRegisterDomain(boolean registerDomain)
           
 void setService(AmazonSimpleWorkflow service)
           
 void setTaskExecutorThreadPoolSize(int taskExecutorThreadPoolSize)
           
 void setTaskListToPoll(String taskListToPoll)
           
 void setTerminationTimeoutSeconds(long terminationTimeoutSeconds)
           
 void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
           
 void shutdown()
           
 boolean shutdownAndAwaitTermination(long timeout, TimeUnit unit)
           
 void shutdownNow()
           
 void start()
           
 void stop()
           
 void stop(Runnable callback)
           
 void stopNow()
           
 void suspendPolling()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpringActivityWorker

public SpringActivityWorker()

SpringActivityWorker

public SpringActivityWorker(AmazonSimpleWorkflow service,
                            String domain,
                            String taskListToPoll)
Method Detail

getService

public AmazonSimpleWorkflow getService()
Specified by:
getService in interface WorkerBase

setService

public void setService(AmazonSimpleWorkflow service)

getDomain

public String getDomain()
Specified by:
getDomain in interface WorkerBase

setDomain

public void setDomain(String domain)

isRegisterDomain

public boolean isRegisterDomain()
Specified by:
isRegisterDomain in interface WorkerBase

setRegisterDomain

public void setRegisterDomain(boolean registerDomain)
Specified by:
setRegisterDomain in interface WorkerBase

getDomainRetentionPeriodInDays

public long getDomainRetentionPeriodInDays()
Specified by:
getDomainRetentionPeriodInDays in interface WorkerBase

setDomainRetentionPeriodInDays

public void setDomainRetentionPeriodInDays(long domainRetentionPeriodInDays)
Specified by:
setDomainRetentionPeriodInDays in interface WorkerBase

getTaskListToPoll

public String getTaskListToPoll()
Specified by:
getTaskListToPoll in interface WorkerBase

setTaskListToPoll

public void setTaskListToPoll(String taskListToPoll)

getDataConverter

public DataConverter getDataConverter()

setDataConverter

public void setDataConverter(DataConverter dataConverter)

getMaximumPollRatePerSecond

public double getMaximumPollRatePerSecond()
Specified by:
getMaximumPollRatePerSecond in interface WorkerBase

setMaximumPollRatePerSecond

public void setMaximumPollRatePerSecond(double maximumPollRatePerSecond)
Specified by:
setMaximumPollRatePerSecond in interface WorkerBase

getMaximumPollRateIntervalMilliseconds

public int getMaximumPollRateIntervalMilliseconds()
Specified by:
getMaximumPollRateIntervalMilliseconds in interface WorkerBase

setMaximumPollRateIntervalMilliseconds

public void setMaximumPollRateIntervalMilliseconds(int maximumPollRateIntervalMilliseconds)
Specified by:
setMaximumPollRateIntervalMilliseconds in interface WorkerBase

getIdentity

public String getIdentity()
Specified by:
getIdentity in interface WorkerBase

setIdentity

public void setIdentity(String identity)
Specified by:
setIdentity in interface WorkerBase

getUncaughtExceptionHandler

public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
Specified by:
getUncaughtExceptionHandler in interface WorkerBase

setUncaughtExceptionHandler

public void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Specified by:
setUncaughtExceptionHandler in interface WorkerBase

getPollBackoffInitialInterval

public long getPollBackoffInitialInterval()
Specified by:
getPollBackoffInitialInterval in interface WorkerBase

setPollBackoffInitialInterval

public void setPollBackoffInitialInterval(long backoffInitialInterval)
Specified by:
setPollBackoffInitialInterval in interface WorkerBase

getPollBackoffMaximumInterval

public long getPollBackoffMaximumInterval()
Specified by:
getPollBackoffMaximumInterval in interface WorkerBase

setPollBackoffMaximumInterval

public void setPollBackoffMaximumInterval(long backoffMaximumInterval)
Specified by:
setPollBackoffMaximumInterval in interface WorkerBase

getPollBackoffCoefficient

public double getPollBackoffCoefficient()
Specified by:
getPollBackoffCoefficient in interface WorkerBase

setPollBackoffCoefficient

public void setPollBackoffCoefficient(double backoffCoefficient)
Specified by:
setPollBackoffCoefficient in interface WorkerBase

getPollThreadCount

public int getPollThreadCount()
Specified by:
getPollThreadCount in interface WorkerBase

setPollThreadCount

public void setPollThreadCount(int threadCount)
Specified by:
setPollThreadCount in interface WorkerBase

getTaskExecutorThreadPoolSize

public int getTaskExecutorThreadPoolSize()

setTaskExecutorThreadPoolSize

public void setTaskExecutorThreadPoolSize(int taskExecutorThreadPoolSize)

isDisableServiceShutdownOnStop

public boolean isDisableServiceShutdownOnStop()
Specified by:
isDisableServiceShutdownOnStop in interface WorkerBase

setDisableServiceShutdownOnStop

public void setDisableServiceShutdownOnStop(boolean disableServiceShutdownOnStop)
Specified by:
setDisableServiceShutdownOnStop in interface WorkerBase

suspendPolling

public void suspendPolling()
Specified by:
suspendPolling in interface Suspendable

resumePolling

public void resumePolling()
Specified by:
resumePolling in interface Suspendable

start

public void start()
Specified by:
start in interface WorkerLifecycle
Specified by:
start in interface org.springframework.context.Lifecycle

stopNow

public void stopNow()

shutdown

public void shutdown()
Specified by:
shutdown in interface WorkerLifecycle

shutdownNow

public void shutdownNow()
Specified by:
shutdownNow in interface WorkerLifecycle

shutdownAndAwaitTermination

public boolean shutdownAndAwaitTermination(long timeout,
                                           TimeUnit unit)
                                    throws InterruptedException
Specified by:
shutdownAndAwaitTermination in interface WorkerLifecycle
Throws:
InterruptedException

awaitTermination

public boolean awaitTermination(long timeout,
                                TimeUnit unit)
                         throws InterruptedException
Specified by:
awaitTermination in interface WorkerLifecycle
Throws:
InterruptedException

stop

public void stop()
Specified by:
stop in interface org.springframework.context.Lifecycle

isRunning

public boolean isRunning()
Specified by:
isRunning in interface WorkerBase
Specified by:
isRunning in interface org.springframework.context.Lifecycle

setActivitiesImplementations

public void setActivitiesImplementations(Iterable<Object> activitiesImplementations)
                                  throws InstantiationException,
                                         IllegalAccessException,
                                         SecurityException,
                                         NoSuchMethodException
Throws:
InstantiationException
IllegalAccessException
SecurityException
NoSuchMethodException

getActivitiesImplementations

public Iterable<Object> getActivitiesImplementations()

addActivitiesImplementation

public List<ActivityType> addActivitiesImplementation(Object activitiesImplementation)
                                               throws InstantiationException,
                                                      IllegalAccessException,
                                                      SecurityException,
                                                      NoSuchMethodException
Throws:
InstantiationException
IllegalAccessException
SecurityException
NoSuchMethodException

registerTypesToPoll

public void registerTypesToPoll()
Specified by:
registerTypesToPoll in interface WorkerBase

getPhase

public int getPhase()
Specified by:
getPhase in interface org.springframework.context.Phased
Returns:
default is 0

setPhase

public void setPhase(int startPhase)

isAutoStartup

public boolean isAutoStartup()
Specified by:
isAutoStartup in interface org.springframework.context.SmartLifecycle

getTerminationTimeoutSeconds

public long getTerminationTimeoutSeconds()

setTerminationTimeoutSeconds

public void setTerminationTimeoutSeconds(long terminationTimeoutSeconds)

isDisableAutoStartup

public boolean isDisableAutoStartup()

setDisableAutoStartup

public void setDisableAutoStartup(boolean disableAutoStartup)

stop

public void stop(Runnable callback)
Specified by:
stop in interface org.springframework.context.SmartLifecycle

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.