Package org.rexxla.bsf.engines.rexx
Class AbstractExitHandler
java.lang.Object
org.rexxla.bsf.engines.rexx.AbstractExitHandler
- All Implemented Interfaces:
RexxExitHandler,RexxHandler
Make it easy for Rexx programs to implement direct command handlers in Rexx. :)
- Since:
- 850 (2022-08-30)
-
Field Summary
Fields inherited from interface org.rexxla.bsf.engines.rexx.RexxExitHandler
RX_EXIT_NAMES, RXCMD, RXCMDHST, RXENDLST, RXEXF, RXEXFCAL, RXEXIT_HANDLED, RXEXIT_NOT_HANDLED, RXEXIT_RAISE_ERROR, RXFNC, RXFNCCAL, RXHLT, RXHLTCLR, RXHLTTST, RXINI, RXINIEXT, RXMSQ, RXMSQNAM, RXMSQPLL, RXMSQPSH, RXMSQSIZ, RXNOOFEXITS, RXNOVAL, RXNOVALCALL, RXOFNC, RXOFNCCAL, RXSIO, RXSIODTR, RXSIOSAY, RXSIOTLL, RXSIOTRC, RXSIOTRD, RXTER, RXTEREXT, RXTRC, RXTRCTST, RXVALUE, RXVALUECALL, version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract inthandleExit(Object slot, int exitNumber, int subFunction, Object[] parmBlock) Exit handler signature (called via native code) according to the ooRexx API documentation inrexxpg.pdf.static voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 Details
-
AbstractExitHandler
public AbstractExitHandler()
-
-
Method Details
-
main
-
handleExit
Description copied from interface:RexxExitHandlerExit handler signature (called via native code) according to the ooRexx API documentation inrexxpg.pdf.The following documents briefly the
parmBlock-array that gets supplied to the Java exit handler, depending on the exit number and subfunction. Please refer also to the ooRexx documentation "rexxpg.pdf", section entitled "Context Exit Definitions" on which this implementation is based upon.Exit name/number subfunction name/number Description RXFNC/2RXFNCCAL/1Processes calls to external functions.
parmBlock:[0] rxfnc_flags, type:boolean[][0] rxfferr, settable ("invalid call to routine")[1] rxffnfnd, settable ("function not found")[2] rxffsub, iftruethen called as subroutine, else as function
[1] rxfnc_name, subroutine/function name, type:String[2] rxfnc_que, current queue name, type:String[3] rxfnc_argv, supplied arguments, type:Object[], can benull[4] rxfnc_retc, return value by handler, if any, type:StringRXCMD/3RXCMDHST/1Calls a named subcommand handler.
parmBlock:[0] rxfnc_flags, type:boolean[][0] rxffail, settable ("command failed (trap FAILURE condition)")[1] rxffcerr, settable ("command raises an error (trap ERROR condition)")
[1] rxcmd_address, address name, type:String[2] rxcmd_dll, DLL name, if handler is in a DLL, empty string else, type:String[3] rxcmd_command, command, type:String[4] rxcmd_retc, return value by handler, if any, type:StringRXMSQ/4RXMSQPLL/1Pulls a line from the external data queue.
parmBlock:[0] rxmsq_retc, return value by handler, if any, type:StringRXMSQPSH/2Places a line in the external data queue.
parmBlock:[0] rxfnc_flags, type:boolean[][0] rxfmlifo, if setLIFO (QUEUE), iffalse FIFO (PUSH)
[1] rxmsq_value, entry to be pushed/queued, type:StringRXMSQSIZ/3Returns the number of lines in the external data queue.
parmBlock:[0] rxmsq_size, number of lines in queue, type:StringRXMSQNAM/20Sets the name of the active external data queue.
parmBlock:[0] rxmsq_name, new external data queue name, type:StringRXSIO/5RXSIOSAY/1Writes a line to the standard output stream.
parmBlock:[0] rxsio_string, string to display, type:StringRXSIOTRC/2Writes trace and error message output to the standard error stream. parmBlock:[0] rxsio_string, trace line to display, type:StringRXSIOTRD/3Reads from standard input stream.
parmBlock:[0] rxsiotrd_retc, return value by handler, if any, type:StringRXSIODTR/4Interactive debug input.
parmBlock:[0] rxsiodtr_retc, return value by handler, if any, type:StringRXHLT/7RXHLTCLR/1Clears the HALT condition.
parmBlock:[0] rxhlt_flags, type:boolean[][0] rxfhhalt, settable, if set totrue, theHALTcondition will be cleared
RXHLTTST/2Tests the halt indicator.
parmBlock:[0] rxhlt_flags, type:boolean[][0] rxfhhalt, settable, if set totrue, theHALTcondition will be raised
RXTRC/8RXTRCTST/1Tests the external trace indicator.
parmBlock:[0] rxtrc_flags, type:boolean[][0] rxftrace, settable, if set totrue, then tracing will take place
RXINI/9RXINIEXT/1Initializing processing. RXTER/10RXTEREXT/1Termination processing. RXEXF/12RXEXFCAL/1Processes calls to external functions (ooRexx version), at end of search for an external routine.
parmBlock:[0] rxfnc_flags, type:boolean[][0] rxfferr, settable ("invalid call to routine")[1] rxffnfnd, settable ("function not found")[2] rxffsub, iftruethen called as subroutine, else as function
[1] rxfnc_name, subroutine/function name, type:String[2] rxfnc_argv, supplied arguments, type:Object[], can benull[3] rxfnc_retc, return value by handler, if any, type:ObjectRXNOVAL/13RXNOVALCALL/1Processes a Rexx NOVALUEcondition.
parmBlock:[0] variable_name, variable name, type:String[1] value, return value by handler, if any, type:ObjectRXVALUE/14RXVALUECALL/1Processes an extended call to the VALUE()built-in function ("BIF")parmBlock:[0] selector, the environment selector name, type:String[1] variable_name, variable name, type:String[2] value, return value by handler, if any, type:ObjectRXOFNC/15RXOFNCCAL/1Processes calls to external functions (ooRexx version), at beginning of the search for an external routine.
parmBlock:[0] rxfnc_flags, type:boolean[][0] rxfferr, settable ("invalid call to routine")[1] rxffnfnd, settable ("function not found")[2] rxffsub, iftruethen called as subroutine, else as function
[1] rxfnc_name, subroutine/function name, type:String[2] rxfnc_argv, supplied arguments, type:Object[], can benull[3] rxfnc_retc, return value by handler, if any, type:Object- Specified by:
handleExitin interfaceRexxExitHandler- Parameters:
slot- this is an opaqueObjectargument which must be supplied unchanged to the direct Rexx API methods inRexxHandlerexitNumber- the Rexx exit numbersubFunction- the Rexx exit subfunction numberparmBlock- anObject[]which is structured according to the ooRexx exit documentation inrexxpg.pdf; each structure is itself contained in anObject[]- Returns:
- RXEXIT_HANDLED (0), RXEXIT_NOT_HANDLED (1) or RXEXIT_RAISE_ERROR (-1)
-