public class SimpleActivity extends Object implements Activity
| Modifier and Type | Field and Description |
|---|---|
protected ActivityDef |
activityDef |
| Constructor and Description |
|---|
SimpleActivity(ActivityDef activityDef) |
SimpleActivity(String activityDefString) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeAutoCloseables()
Close all autocloseables that have been registered with this Activity.
|
int |
compareTo(Activity o) |
ActionDispenser |
getActionDispenserDelegate() |
ActivityController |
getActivityController() |
ActivityDef |
getActivityDef() |
RateLimiter |
getCycleLimiter()
Get the current cycle rate limiter for this activity.
|
RateLimiter |
getCycleRateLimiter(Supplier<? extends RateLimiter> s)
Get or create the cycle rate limiter in a safe way.
|
InputDispenser |
getInputDispenserDelegate() |
OutputDispenser |
getMarkerDispenserDelegate() |
MotorDispenser |
getMotorDispenserDelegate() |
RateLimiter |
getPhaseLimiter()
Get the current phase rate limiter for this activity.
|
RateLimiter |
getPhaseRateLimiter(Supplier<? extends RateLimiter> supplier)
Get or create the phase
RateLimiter in a concurrent-safe
way. |
IntPredicateDispenser |
getResultFilterDispenserDelegate() |
RunState |
getRunState() |
RateLimiter |
getStrideLimiter()
Get the current stride rate limiter for this activity.
|
RateLimiter |
getStrideRateLimiter(Supplier<? extends RateLimiter> s)
Get or create the stride
RateLimiter in a concurrent-safe
way. |
void |
initActivity() |
void |
onActivityDefUpdate(ActivityDef activityDef) |
void |
registerAutoCloseable(AutoCloseable closeable)
Register an object which should be closed after this activity is shutdown.
|
void |
setActionDispenserDelegate(ActionDispenser actionDispenser) |
void |
setActivityController(ActivityController activityController)
Provide the activity with the controls needed to stop itself.
|
void |
setCycleLimiter(RateLimiter rateLimiter)
Set the cycle rate limiter for this activity.
|
void |
setInputDispenserDelegate(InputDispenser inputDispenser) |
void |
setMotorDispenserDelegate(MotorDispenser motorDispenser) |
void |
setOutputDispenserDelegate(OutputDispenser outputDispenser) |
void |
setPhaseLimiter(RateLimiter rateLimiter)
Set the phase rate limiter for this activity.
|
void |
setResultFilterDispenserDelegate(IntPredicateDispenser resultFilterDispenser) |
void |
setRunState(RunState runState) |
void |
setStrideLimiter(RateLimiter rateLimiter)
Set the stride rate limiter for this activity.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAlias, getCycleSummary, getParams, shutdownActivityprotected ActivityDef activityDef
public SimpleActivity(ActivityDef activityDef)
public SimpleActivity(String activityDefString)
public void initActivity()
initActivity in interface Activitypublic RunState getRunState()
getRunState in interface Activitypublic void setRunState(RunState runState)
setRunState in interface Activitypublic final MotorDispenser getMotorDispenserDelegate()
getMotorDispenserDelegate in interface Activitypublic final void setMotorDispenserDelegate(MotorDispenser motorDispenser)
setMotorDispenserDelegate in interface Activitypublic final InputDispenser getInputDispenserDelegate()
getInputDispenserDelegate in interface Activitypublic final void setInputDispenserDelegate(InputDispenser inputDispenser)
setInputDispenserDelegate in interface Activitypublic final ActionDispenser getActionDispenserDelegate()
getActionDispenserDelegate in interface Activitypublic final void setActionDispenserDelegate(ActionDispenser actionDispenser)
setActionDispenserDelegate in interface Activitypublic IntPredicateDispenser getResultFilterDispenserDelegate()
getResultFilterDispenserDelegate in interface Activitypublic void setResultFilterDispenserDelegate(IntPredicateDispenser resultFilterDispenser)
setResultFilterDispenserDelegate in interface Activitypublic OutputDispenser getMarkerDispenserDelegate()
getMarkerDispenserDelegate in interface Activitypublic void setOutputDispenserDelegate(OutputDispenser outputDispenser)
setOutputDispenserDelegate in interface Activitypublic ActivityDef getActivityDef()
getActivityDef in interface Activitypublic int compareTo(Activity o)
compareTo in interface Comparable<Activity>public void setActivityController(ActivityController activityController)
ActivitysetActivityController in interface ActivityactivityController - The dedicated control interface for this activitypublic ActivityController getActivityController()
getActivityController in interface Activitypublic void registerAutoCloseable(AutoCloseable closeable)
ActivityregisterAutoCloseable in interface Activitycloseable - An Autocloseable objectpublic void closeAutoCloseables()
ActivitycloseAutoCloseables in interface Activitypublic RateLimiter getCycleLimiter()
ActivitygetCycleLimiter in interface ActivityRateLimiterpublic void setCycleLimiter(RateLimiter rateLimiter)
ActivityActivity.getCycleRateLimiter(Supplier) should be used.setCycleLimiter in interface ActivityrateLimiter - The cycle RateLimiter for this activitypublic RateLimiter getCycleRateLimiter(Supplier<? extends RateLimiter> s)
ActivitygetCycleRateLimiter in interface Activitys - A RateLimiter SupplierRateLimiterpublic RateLimiter getStrideLimiter()
ActivitygetStrideLimiter in interface ActivityRateLimiterpublic void setStrideLimiter(RateLimiter rateLimiter)
ActivityActivity.getStrideRateLimiter(Supplier)} should be used.setStrideLimiter in interface ActivityrateLimiter - The stride RateLimiter for this activity.public RateLimiter getStrideRateLimiter(Supplier<? extends RateLimiter> s)
ActivityRateLimiter in a concurrent-safe
way. Implementations should ensure that this method is synchronized or
that each requestor gets the same stride rate limiter for the activity.getStrideRateLimiter in interface Activitys - A RateLimiter SupplierRateLimiterpublic RateLimiter getPhaseLimiter()
ActivitygetPhaseLimiter in interface ActivityRateLimiterpublic void setPhaseLimiter(RateLimiter rateLimiter)
ActivityActivity.getPhaseRateLimiter(Supplier)} should be used.setPhaseLimiter in interface ActivityrateLimiter - The phase RateLimiter for this activity.public RateLimiter getPhaseRateLimiter(Supplier<? extends RateLimiter> supplier)
ActivityRateLimiter in a concurrent-safe
way. Implementations should ensure that this method is synchronized or
that each requestor gets the same phase rate limiter for the activity.getPhaseRateLimiter in interface Activitysupplier - A RateLimiter SupplierRateLimiterpublic void onActivityDefUpdate(ActivityDef activityDef)
onActivityDefUpdate in interface ActivityDefObserverCopyright © 2018. All rights reserved.