org.rexxla.bsf.engines.rexx

## Class AbstractRedirectingCommandHandler

- java.lang.Object
- - org.rexxla.bsf.engines.rexx.AbstractRedirectingCommandHandler

- All Implemented Interfaces:
    RexxCommandHandler, RexxHandler, RexxRedirectingCommandHandler

      public abstract class AbstractRedirectingCommandHandler
      extends java.lang.Object
      implements RexxRedirectingCommandHandler

  Make it easy for Rexx programs to implement redirecting command handlers in Rexx. :)
  Since:
    850 (2022-08-23)

- - ### Field Summary

    - ### Fields inherited from interface org.rexxla.bsf.engines.rexx.RexxRedirectingCommandHandler

      `ARE_OUTPUT_AND_ERROR_SAME_TARGET, IS_ERROR_REDIRECTED, IS_INPUT_REDIRECTED, IS_OUTPUT_REDIRECTED, IS_REDIRECTION_REQUESTED, version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractRedirectingCommandHandler()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.lang.Object` | `handleCommand(java.lang.Object slot, java.lang.String address, java.lang.String command)` Command handler signature (called via native code) according to the ooRexx API documentation in `rexxpg.pdf`.
    `static void` | `main(java.lang.String[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.rexxla.bsf.engines.rexx.RexxRedirectingCommandHandler

      `areOutputAndErrorSameTarget, isErrorRedirected, isInputRedirected, isOutputRedirected, isRedirectable, isRedirectionRequested, readInput, readInputAsByteArray, readInputBuffer, toString, writeError, writeError, writeErrorBuffer, writeOutput, writeOutput, writeOutputBuffer`

    - ### Methods inherited from interface org.rexxla.bsf.engines.rexx.RexxHandler

      `checkCondition, clearCondition, dropContextVariable, getAllContextVariables, getCallerContext, getConditionInfo, getContextVariable, getGlobalEnvironment, getInterpreterVersion, getLanguageLevel, getLocalEnvironment, getNil, haltThread, newArray, newDirectory, newStem, newStringTable, raiseCondition, raiseException, raiseException0, raiseException1, raiseException2, setContextVariable, setContextVariableToNil, setThreadTrace`

- - ### Constructor Detail

    - #### AbstractRedirectingCommandHandler

          public AbstractRedirectingCommandHandler()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)

    - #### handleCommand

          public abstract java.lang.Object handleCommand(java.lang.Object slot,
                                                         java.lang.String address,
                                                         java.lang.String command)

      Description copied from interface: `RexxCommandHandler`
      Command handler signature (called via native code) according to the ooRexx API documentation in `rexxpg.pdf`.
      Specified by:
        `handleCommand` in interface `RexxCommandHandler`
      Parameters:
        `slot` - this is an opaque `Object` argument which must be supplied unchanged to the direct Rexx API methods in `RexxHandler`
        `address` - a String denoting the name of the command environment for which this method got invoked
        `command` - a String containing the command passed from Rexx
      Returns:
        any value, which can be retrieved on the Rexx side via the variable `RC` (result code)