public abstract class AbstractActionExecutor extends Object implements ActionExecutor
Modifier and Type | Field and Description |
---|---|
protected Map<ActionArgument<LocalService>,StateVariableAccessor> |
outputArgumentAccessors |
Modifier | Constructor and Description |
---|---|
protected |
AbstractActionExecutor() |
protected |
AbstractActionExecutor(Map<ActionArgument<LocalService>,StateVariableAccessor> outputArgumentAccessors) |
Modifier and Type | Method and Description |
---|---|
void |
execute(ActionInvocation<LocalService> actionInvocation)
Obtains the service implementation instance from the
ServiceManager , handles exceptions. |
protected abstract void |
execute(ActionInvocation<LocalService> actionInvocation,
Object serviceImpl) |
Map<ActionArgument<LocalService>,StateVariableAccessor> |
getOutputArgumentAccessors() |
protected Object |
readOutputArgumentValues(Action<LocalService> action,
Object instance)
Reads the output arguments after an action execution using accessors.
|
protected void |
setOutputArgumentValue(ActionInvocation<LocalService> actionInvocation,
ActionArgument<LocalService> argument,
Object result)
Sets the output argument value on the
ActionInvocation , considers string conversion. |
protected Map<ActionArgument<LocalService>,StateVariableAccessor> outputArgumentAccessors
protected AbstractActionExecutor()
protected AbstractActionExecutor(Map<ActionArgument<LocalService>,StateVariableAccessor> outputArgumentAccessors)
public Map<ActionArgument<LocalService>,StateVariableAccessor> getOutputArgumentAccessors()
public void execute(ActionInvocation<LocalService> actionInvocation)
ServiceManager
, handles exceptions.execute
in interface ActionExecutor
protected abstract void execute(ActionInvocation<LocalService> actionInvocation, Object serviceImpl) throws Exception
Exception
protected Object readOutputArgumentValues(Action<LocalService> action, Object instance) throws Exception
action
- The action of which the output arguments are read.instance
- The instance on which the accessors will be invoked.null
if the action has no output arguments, a single instance if it has one, an
Object[]
otherwise.Exception
protected void setOutputArgumentValue(ActionInvocation<LocalService> actionInvocation, ActionArgument<LocalService> argument, Object result) throws ActionException
ActionInvocation
, considers string conversion.ActionException
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.