| Constructor and Description |
|---|
SingleAction(PluginContext pluginContext,
ActionExecutionContext executionContext,
EventLoopExecutor executor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected ActionExecutionContext |
getContext() |
boolean |
isAssociatedWithPlugin(PluginContext ctx)
Indicates whether this action is associated with a particular plugin.
|
abstract void |
onMessage(ActionLifecycleContext ctx,
java.lang.String msgName,
java.lang.Object prop)
Callback received when the action is sent a message.
|
abstract void |
onStart(ActionLifecycleContext ctx)
Callback received when the action is started.
|
abstract void |
onStop(ActionLifecycleContext ctx)
Callback received when the action is manually stopped.
|
Future |
sendMessage(ActionLifecycleContext ctx,
java.lang.String msgName,
java.lang.Object prop)
Sends a message to the action.
|
Future |
start(ActionLifecycleContext ctx)
Starts the action.
|
Future |
stop(ActionLifecycleContext ctx)
Stops the action.
|
public SingleAction(PluginContext pluginContext, ActionExecutionContext executionContext, EventLoopExecutor executor)
pluginContext - the plugin that provides this actionexecutionContext - an ActionExecutionContext implementationexecutor - the event loop executor to use when executing this actionpublic boolean isAssociatedWithPlugin(PluginContext ctx)
ActionisAssociatedWithPlugin in interface Actionctx - the plugin contextpublic abstract void onStart(ActionLifecycleContext ctx)
ctx - the lifecycle contextpublic abstract void onMessage(ActionLifecycleContext ctx, java.lang.String msgName, java.lang.Object prop)
ctx - the lifecycle contextmsgName - the name of the eventprop - a property object (specific to the event)public abstract void onStop(ActionLifecycleContext ctx)
ctx - the lifecycle contextprotected ActionExecutionContext getContext()
public Future sendMessage(ActionLifecycleContext ctx, java.lang.String msgName, java.lang.Object prop)
ActionsendMessage in interface Actionctx - the lifecycle contextmsgName - the name of the messageprop - a property objectpublic Future start(ActionLifecycleContext ctx)
Actionpublic Future stop(ActionLifecycleContext ctx)
ActionCopyright © 2015 Whizzo Software LLC. All rights reserved.