public interface RexxRedirectingCommandHandler extends RexxCommandHandler
rexxapi.pdf
documentation. Defines all new redirecting methods
as default methods.
------------------------ Apache Version 2.0 license ------------------------- Copyright (C) 2022 Rony G. Flatscher Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -----------------------------------------------------------------------------
Modifier and Type | Field and Description |
---|---|
static int |
ARE_OUTPUT_AND_ERROR_SAME_TARGET |
static int |
IS_ERROR_REDIRECTED |
static int |
IS_INPUT_REDIRECTED |
static int |
IS_OUTPUT_REDIRECTED |
static int |
IS_REDIRECTION_REQUESTED |
static java.lang.String |
version
Version string indicating version of this class (majorVersion*100+minorVersion
concatenated with a dot and the sorted date of last change.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
areOutputAndErrorSameTarget(java.lang.Object slot)
Determines whether output and error are the same target.
|
default boolean |
isErrorRedirected(java.lang.Object slot)
Determines whether this invocation redirects error.
|
default boolean |
isInputRedirected(java.lang.Object slot)
Determines whether this invocation redirects input.
|
default boolean |
isOutputRedirected(java.lang.Object slot)
Determines whether this invocation redirects output.
|
default boolean |
isRedirectable()
Indicates that the command handler is redirectable (a new feature
in ooRexx 5.0).
|
default boolean |
isRedirectionRequested(java.lang.Object slot)
Determines whether this invocation employs redirection.
|
default java.lang.String |
readInput(java.lang.Object slot)
Reads the next line from input.
|
default byte[] |
readInputAsByteArray(java.lang.Object slot)
Reads the next line from input, does not apply a codepage translation to Java but
returns the data as a byte array.
|
default java.lang.String |
readInputBuffer(java.lang.Object slot)
Reads all remaining items from input separated by the platform specific line-end character(s).
|
default java.lang.String |
toString(java.lang.Object slot,
java.lang.String environmentName)
Create a string rendering of this environment handler with current settings.
|
default void |
writeError(java.lang.Object slot,
byte[] data)
Writes all byte[] data as a single line, does not apply a codepage translation.
|
default void |
writeError(java.lang.Object slot,
java.lang.String line)
Writes a single line of String data.
|
default void |
writeErrorBuffer(java.lang.Object slot,
java.lang.String data)
Writes all String data.
|
default void |
writeOutput(java.lang.Object slot,
byte[] data)
Writes all byte[] data as a single line, does not apply a codepage translation.
|
default void |
writeOutput(java.lang.Object slot,
java.lang.String line)
Writes a single line of String data.
|
default void |
writeOutputBuffer(java.lang.Object slot,
java.lang.String data)
Writes the supplied string data, ooRexx will split it into individual lines
at CR-LF boundaries.
|
handleCommand
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
static final java.lang.String version
static final int IS_REDIRECTION_REQUESTED
static final int IS_INPUT_REDIRECTED
static final int IS_OUTPUT_REDIRECTED
static final int IS_ERROR_REDIRECTED
static final int ARE_OUTPUT_AND_ERROR_SAME_TARGET
default boolean isRedirectable()
isRedirectable
in interface RexxCommandHandler
default boolean isRedirectionRequested(java.lang.Object slot)
true
if redirection is in effect, false
elsedefault boolean isInputRedirected(java.lang.Object slot)
true
if input redirection is in effect, false
elsedefault boolean isOutputRedirected(java.lang.Object slot)
true
if output redirection is in effect, false
elsedefault boolean isErrorRedirected(java.lang.Object slot)
true
if error redirection is in effect, false
elsedefault boolean areOutputAndErrorSameTarget(java.lang.Object slot)
true
if output and error are the same target, false
elsedefault java.lang.String readInput(java.lang.Object slot)
default byte[] readInputAsByteArray(java.lang.Object slot)
default java.lang.String readInputBuffer(java.lang.Object slot)
default void writeOutput(java.lang.Object slot, java.lang.String line)
slot
- opaque argument supplied to the handler methods by the Rexx native
code interfaceline
- the String data to write to outputdefault void writeOutput(java.lang.Object slot, byte[] data)
slot
- opaque argument supplied to the handler methods by the Rexx native
code interfacedata
- the byte array to write to outputdefault void writeOutputBuffer(java.lang.Object slot, java.lang.String data)
slot
- opaque argument supplied to the handler methods by the Rexx native
code interfacedata
- the String to write to outputdefault void writeError(java.lang.Object slot, java.lang.String line)
slot
- opaque argument supplied to the handler methods by the Rexx native
code interfaceline
- the String data to write to errordefault void writeError(java.lang.Object slot, byte[] data)
slot
- opaque argument supplied to the handler methods by the Rexx native
code interfacedata
- the byte array to write to errordefault void writeErrorBuffer(java.lang.Object slot, java.lang.String data)
slot
- opaque argument supplied to the handler methods by the Rexx native
code interfacedata
- the String to write to errordefault java.lang.String toString(java.lang.Object slot, java.lang.String environmentName)
toString
in interface RexxCommandHandler
slot
- supply the received slot argumentenvironmentName
- supply the environment name this handler handles