public class ManualActionEngine extends java.lang.Object implements ActionEngine
ActionEngine. ManualActionEngine uses no additional
threads and will not run any actions until resume() is called. When the engine is
ticking all jobs that should be executed will be (even if past their estimated schedule time).| Modifier and Type | Class and Description |
|---|---|
class |
ManualActionEngine.ManualContext<T>
Manual action context.
|
| Constructor and Description |
|---|
ManualActionEngine()
Creates a new instance of ManualActionEngine.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addWork(ManualActionEngine.ManualContext<?> context)
Adds work to the engine.
|
ActionBindings |
getBindings()
Bindings for this engine.
|
protected ManualWorkQueue<ManualActionEngine.ManualContext<?>> |
getWorkQueue()
Gets the engine's work queue.
|
boolean |
isPaused()
Whether the engine is paused.
|
boolean |
isStopped()
Whether the engine is stopped.
|
<T> ManualActionEngine.ManualContext<T> |
newContext(Action<T> action)
Creates an action context to define how the action will be scheduled for execution.
|
void |
pause()
Pauses action processing.
|
protected boolean |
removeWork(ManualActionEngine.ManualContext<?> context)
Removes work from the engine.
|
void |
resume()
Resumes performing actions.
|
void |
stop()
Permanently stops the engine.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitputInBindings, removeFromBindings, schedule, schedulepublic ManualActionEngine()
protected boolean addWork(ManualActionEngine.ManualContext<?> context)
context - Work to add.Actions.requireNotStopped(ActionEngine)public ActionBindings getBindings()
ActionEnginegetBindings in interface ActionEngineprotected ManualWorkQueue<ManualActionEngine.ManualContext<?>> getWorkQueue()
public boolean isPaused()
ActionEngineisPaused in interface ActionEnginepublic boolean isStopped()
ActionEngineisStopped in interface ActionEnginepublic <T> ManualActionEngine.ManualContext<T> newContext(Action<T> action)
ActionEnginenewContext in interface ActionEngineaction - Action to create context for.public void pause()
ActionEnginepause in interface ActionEngineprotected boolean removeWork(ManualActionEngine.ManualContext<?> context)
context - Work to remove.public void resume()
ActionEngineresume in interface ActionEnginepublic void stop()
ActionEnginestop in interface ActionEngine