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 ActionExecutorprotected abstract void execute(ActionInvocation<LocalService> actionInvocation, Object serviceImpl) throws Exception
Exceptionprotected 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.Exceptionprotected void setOutputArgumentValue(ActionInvocation<LocalService> actionInvocation, ActionArgument<LocalService> argument, Object result) throws ActionException
ActionInvocation, considers string conversion.ActionExceptionCopyright © 2023 jUPnP.org. All rights reserved.