Package adams.console

Class Logging

    • Field Detail

      • DEFAULT_PORT

        public static final int DEFAULT_PORT
        the default port to use for receiving logging messages.
        See Also:
        Constant Field Values
      • m_RemoteHost

        protected BaseHostname m_RemoteHost
        the remote host/port to connect to.
      • m_LocalHost

        protected BaseHostname m_LocalHost
        the local host/port to use.
      • m_MaxFailures

        protected int m_MaxFailures
        the maximum number of connection failures to handle (-1 for indefinite).
      • m_Stopped

        protected boolean m_Stopped
        whether listening was stopped.
    • Constructor Detail

      • Logging

        public Logging()
    • Method Detail

      • commandProcessorTipText

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

        public void setRemoteHost​(BaseHostname value)
        Sets the host to capture the logging from.
        Parameters:
        value - the host/port
      • getRemoteHost

        public BaseHostname getRemoteHost()
        Returns the host to capture the logging from.
        Returns:
        the host/port
      • remoteHostTipText

        public String remoteHostTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setLocalHost

        public void setLocalHost​(BaseHostname value)
        Sets the local host/port to send the log records to.
        Parameters:
        value - the local host/port
      • getLocalHost

        public BaseHostname getLocalHost()
        Returns the local host/port to send the log records to.
        Returns:
        the local host/port
      • localHostTipText

        public String localHostTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMaxFailures

        public void setMaxFailures​(int value)
        Sets the maximum number of conection failures to tolerate.
        Parameters:
        value - the maximum, -1 for indefinite
      • getMaxFailures

        public int getMaxFailures()
        Returns the maximum number of connection failures to tolerate.
        Returns:
        the maximum, -1 for indefinite
      • maxFaiuresTipText

        public String maxFaiuresTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • configureEngine

        protected DefaultScriptingEngine configureEngine​(int defPort)
        Returns new instance of a configured scripting engine.
        Parameters:
        defPort - the default port to use
        Returns:
        the engine
      • sendCommandWithReponse

        public String sendCommandWithReponse​(RemoteCommandWithResponse cmd,
                                             BaseHostname local,
                                             BaseHostname remote,
                                             int defPort)
        Sends the specified command and the response handler for intercepting the result.
        Parameters:
        cmd - the command to send
        local - the local host
        remote - the remote host
        defPort - the default port to use
      • isStopped

        public boolean isStopped()
        Whether the execution has been stopped.
        Specified by:
        isStopped in interface StoppableWithFeedback
        Returns:
        true if stopped
      • stopExecution

        public void stopExecution()
        Stops the execution.
        Specified by:
        stopExecution in interface Stoppable
      • main

        public static void main​(String[] args)
                         throws Exception
        Starts the terminal application from commandline.
        Parameters:
        args - the arguments
        Throws:
        Exception - if start up fails