Class AbstractRemoteFlowCommandAction

    • Field Detail

      • DEFAULT_PORT

        public static final int DEFAULT_PORT
        the default port to use for refreshing flows.
        See Also:
        Constant Field Values
      • m_PanelFlows

        protected com.googlecode.lanterna.gui2.Panel m_PanelFlows
        the panel for the connection/table.
      • m_PanelBottom

        protected com.googlecode.lanterna.gui2.Panel m_PanelBottom
        the bottom panel for additional content.
      • m_TextRemote

        protected com.googlecode.lanterna.gui2.TextBox m_TextRemote
        the remote machine.
      • m_TextLocal

        protected com.googlecode.lanterna.gui2.TextBox m_TextLocal
        the local machine.
      • m_ButtonRefresh

        protected com.googlecode.lanterna.gui2.Button m_ButtonRefresh
        the button for refreshing the flows.
      • m_TableFlows

        protected com.googlecode.lanterna.gui2.table.Table<String> m_TableFlows
        the table with the remote flows.
      • m_ButtonPauseFlow

        protected com.googlecode.lanterna.gui2.Button m_ButtonPauseFlow
        the button for pausing the flow.
      • m_ButtonResumeFlow

        protected com.googlecode.lanterna.gui2.Button m_ButtonResumeFlow
        the button for resuming the flow.
      • m_ButtonStopFlow

        protected com.googlecode.lanterna.gui2.Button m_ButtonStopFlow
        the button for stopping the flow.
      • m_ButtonStopAdams

        protected com.googlecode.lanterna.gui2.Button m_ButtonStopAdams
        the button for stopping the ADAMS instance.
      • m_ButtonKillAdams

        protected com.googlecode.lanterna.gui2.Button m_ButtonKillAdams
        the button for killing the ADAMS isntance.
    • Constructor Detail

      • AbstractRemoteFlowCommandAction

        public AbstractRemoteFlowCommandAction()
        Initializes the action with no owner.
      • AbstractRemoteFlowCommandAction

        public AbstractRemoteFlowCommandAction​(adams.terminal.application.AbstractTerminalApplication owner)
        Initializes the action.
        Parameters:
        owner - the owning application
    • Method Detail

      • configureEngine

        protected adams.scripting.engine.DefaultScriptingEngine configureEngine​(adams.scripting.responsehandler.ResponseHandler responseHandler)
        Returns new instance of a configured scripting engine.
        Parameters:
        responseHandler - the handler to use for intercepting the result, can be null
        Returns:
        the engine
      • sendCommand

        public void sendCommand​(adams.scripting.command.RemoteCommand cmd)
        Sends the specified command, not waiting for a response.
        Parameters:
        cmd - the command to send
      • sendCommandWithReponse

        public void sendCommandWithReponse​(adams.scripting.command.RemoteCommandWithResponse cmd)
        Sends the specified command. Uses a default response handler for intercepting the result.
        Parameters:
        cmd - the command to send
      • sendCommandWithReponse

        public void sendCommandWithReponse​(adams.scripting.command.RemoteCommandWithResponse cmd,
                                           adams.scripting.responsehandler.ResponseHandler responseHandler)
        Sends the specified command and the response handler for intercepting the result.
        Parameters:
        cmd - the command to send
        responseHandler - the response handler for intercepting the result, can be null
      • refreshFlows

        protected void refreshFlows()
        Refreshes the list of flows.
      • getSelectedRows

        protected int[] getSelectedRows()
        Returns an ID array of the currently selected flows.
        Returns:
        the flow IDs
      • getSelectedFlowIDs

        protected int[] getSelectedFlowIDs()
        Returns an ID array of the currently selected flows.
        Returns:
        the flow IDs
      • pauseFlow

        protected void pauseFlow()
        Pauses the selected flow(s).
      • resumeFlow

        protected void resumeFlow()
        Resumes the selected flow(s).
      • stopFlow

        protected void stopFlow()
        Stops the selected flow(s).
      • stopAdams

        protected void stopAdams()
        Stops the ADAMS instance.
      • killAdams

        protected void killAdams()
        Kills the ADAMS instance.
      • getFlowsTable

        public com.googlecode.lanterna.gui2.table.Table getFlowsTable()
        Returns the underlying table for the flows.
        Returns:
        the table
      • updateButtons

        protected void updateButtons()
        Updates the state of the buttons.