|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.jzos.MvsConsole
public class MvsConsole
A class with static methods to interface with the MVS console.
Uses JNI wrappers to the C Library __console2() api.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
MvsConsole()
|
|
| Method Summary | |
|---|---|
static void |
deleteMessage(int msgId)
Delete a WTO message. |
static void |
deleteMessages(int[] msgIds)
Delete multiple WTO messages. |
static void |
deleteMessagesWithToken(int deleteToken)
Delete all WTO messages with a given token id. |
static java.lang.String |
getStartParameters()
Answer a String contain any parameters on the MVS Start command that started the current started task. |
static MvsConsoleResult |
interact(java.lang.String msg,
java.lang.String encoding,
int[] routcde,
int[] descr,
long flags,
int token,
int deleteToken,
int[] deleteIds,
boolean waitForCmd)
Interact with the system console by issuing/deleting WTO messages and/or waiting for modify/stop commands. |
static boolean |
isListening()
Returns true if an MvsCommandListener has been established. |
static MvsCommandCallback |
registerMvsCommandCallback(MvsCommandCallback callback)
Register an MVS operator command callback. |
static void |
startMvsCommandListener()
Called by JZOS to allow this Java application intercept MVS Operator commands. |
static MvsConsoleResult |
waitForCmd()
Wait for a command from the operators console. |
static int |
wto(java.lang.String msg,
int routcdeBitMask,
int descrBitMask)
Convenience method for writing a WTO. |
static int |
wto(WtoMessage wtoMessage)
Write a WTO message. |
static int |
wto(WtoMessage wtoMessage,
java.lang.String encoding)
Write a WTO message with a specific encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MvsConsole()
| Method Detail |
|---|
public static java.lang.String getStartParameters()
public static boolean isListening()
public static void startMvsCommandListener()
java.lang.IllegalStateException - if there is already a listener runningpublic static MvsCommandCallback registerMvsCommandCallback(MvsCommandCallback callback)
callback - an implementation of MvsCommandCallback that has customized
handlers for START, MODIFY and STOP.
public static int wto(java.lang.String msg,
int routcdeBitMask,
int descrBitMask)
throws ErrnoException
msg - the message to write. If longer than 125 characters, it will be broken into
multiple lines of 69 characters, broken on word boundaries using the formatting
algorithm in __console2(). Embedded line-separators will cause a new WTO message
line.routcdeBitMask - the ROUTE codes to use for the message. See WtoConstants for details.descrBitMask - the descriptor codes to use. See WtoConstants for details.
ErrnoException - if an error occurs with the __console2() interaction.
public static int wto(WtoMessage wtoMessage)
throws ErrnoException
wtoMessage - the WtoMessage object contain the message, route codes and descriptor codes.
ErrnoException - if an error occurs with the __console2() interaction.
public static int wto(WtoMessage wtoMessage,
java.lang.String encoding)
throws ErrnoException
wtoMessage - the WtoMessage object contain the message, route codes and descriptor codes.encoding - a String containing the encoding name.
ErrnoException - if an error occurs with the __console2() interaction.
public static void deleteMessage(int msgId)
throws ErrnoException
msgId - an int containing the message id of the message to delete
ErrnoException - if an error occurs with the __console2() interaction.
public static void deleteMessages(int[] msgIds)
throws ErrnoException
msgIds - an int array containing the message ids of the messages to delete
ErrnoException - if an error occurs with the __console2() interaction.
public static void deleteMessagesWithToken(int deleteToken)
throws ErrnoException
deleteToken - the token id, given on the matching WtoMessage objects
ErrnoException - if an error occurs with the __console2() interaction.WtoMessage.setToken(int)
public static MvsConsoleResult waitForCmd()
throws ErrnoException
ErrnoException - if the call to __console2() fails.registerMvsCommandCallback(MvsCommandCallback)
public static MvsConsoleResult interact(java.lang.String msg,
java.lang.String encoding,
int[] routcde,
int[] descr,
long flags,
int token,
int deleteToken,
int[] deleteIds,
boolean waitForCmd)
throws ErrnoException
This method calls the __console2() C-Library function.
msg - the WTO message to write.encoding - the codepage to use for the WTO message.routcde - an array of routing codes assigned to the message.descr - an array of message descriptor codes assigned to the message.flags - the flags assigned to the message. Can be 0 or FLAG_CONSOLE_HARDCOPYtoken - the grouping token to use to tag this messagedeleteToken - the grouping token to use to delete messages from the consoledeleteIds - an array of message ids to delete from the console.waitForCmd - a boolean that directs the __console2() command to wait for an operator command
ErrnoException - if the call to __console2() fails. The errno and errno2 code
can be used to determine what the nature of the failure is.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||