Class ExecuteRemoteCommand

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, Pausable, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, FlowPauseStateListener, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class ExecuteRemoteCommand
    extends AbstractTransformer
    implements Pausable, FlowPauseStateListener
    Executes the incoming commands.

    Input/output:
    - accepts:
       adams.scripting.command.RemoteCommand
    - generates:
       adams.scripting.command.RemoteCommand


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: ExecuteRemoteCommand
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing 
        actor handler must have this enabled as well.
        default: false
     
    -max-commands <int> (property: maxCommands)
        The maximum number of commands allowed in the queue.
        default: 100
        minimum: 1
     
    -permission-handler <adams.scripting.permissionhandler.PermissionHandler> (property: permissionHandler)
        The handler that determines what request can be executed.
        default: adams.scripting.permissionhandler.AllowAll
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_MaxCommands

        protected int m_MaxCommands
        the maximum number of commands to allow in queue.
      • m_PermissionHandler

        protected PermissionHandler m_PermissionHandler
        the permission handler to use.
    • Constructor Detail

      • ExecuteRemoteCommand

        public ExecuteRemoteCommand()
    • Method Detail

      • setMaxCommands

        public void setMaxCommands​(int value)
        Sets the maximum number of commands allowed in the queue.
        Parameters:
        value - the maximum
      • getMaxCommands

        public int getMaxCommands()
        Returns the maximum number of commands allowed in the queue.
        Returns:
        the maximum
      • maxCommandsTipText

        public String maxCommandsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setPermissionHandler

        public void setPermissionHandler​(PermissionHandler value)
        Sets the permission handler to use.
        Parameters:
        value - the permission handler
      • getPermissionHandler

        public PermissionHandler getPermissionHandler()
        Returns the permission handler in use.
        Returns:
        the permission handler
      • permissionHandlerTipText

        public String permissionHandlerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        Returns:
        adams.scripting.command.RemoteCommand.class
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Specified by:
        generates in interface OutputProducer
        Returns:
        adams.scripting.command.RemoteCommand.class
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
      • pauseExecution

        public void pauseExecution()
        Pauses the execution.
        Specified by:
        pauseExecution in interface Pausable
      • isPaused

        public boolean isPaused()
        Returns whether the object is currently paused.
        Specified by:
        isPaused in interface Pausable
        Returns:
        true if object is paused
      • resumeExecution

        public void resumeExecution()
        Resumes the execution.
        Specified by:
        resumeExecution in interface Pausable