Interface CommandContext

  • All Known Implementing Classes:
    BasicCommandContext

    public interface CommandContext
    Basic interface for commands. Manages the context variables during execution.
    Author:
    Luca Garulli (l.garulli--(at)--gmail.com)
    • Method Detail

      • updateMetric

        long updateMetric​(String iName,
                          long iValue)
        Updates a counter. Used to record metrics.
        Parameters:
        iName - Metric's name
        iValue - delta to add or subtract
        Returns:
      • isRecordingMetrics

        boolean isRecordingMetrics()
      • setRecordingMetrics

        CommandContext setRecordingMetrics​(boolean recordMetrics)
      • checkTimeout

        boolean checkTimeout()
        Check if timeout is elapsed, if defined.
        Returns:
        false if it the timeout is elapsed and strategy is "return" if the strategy is "exception" (default)
      • setInputParameters

        void setInputParameters​(Map<String,​Object> inputParameters)
      • declareScriptVariable

        void declareScriptVariable​(String varName)
      • isScriptVariableDeclared

        boolean isScriptVariableDeclared​(String varName)