public class TerminalPrincipalFacility extends Terminal implements TerminalSendBits
This Class provides the Java interface to a CICS Terminal.
com.ibm.cics.server.API
for general restrictions on using the JCICS API.
FRSET, NUMBER_OF_BITS, WAIT
ALARM, ERASE, FREEKB, PRINT
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the terminal.
|
void |
converse(DataHolder data)
Send then receive 3270 data stream from the terminal
|
void |
converseASIS(DataHolder data)
Send then receive 3270 data stream from the terminal
without upper-case translation
|
void |
erase()
Erase the terminal.
|
byte |
getAIDbyte()
Return the AID (Action Identifier) key last entered by the user at the
terminal.
|
void |
getTCTUA(TCTUAHolder holder)
Return a copy of the Terminal User Area (TCTUA).
|
byte[] |
getTERMCODE()
Return the TERMCODE for the principal facility.
|
void |
receive(DataHolder data)
Receive 3270 data stream from the terminal
|
void |
receiveASIS(DataHolder data)
Receive 3270 data stream from the terminal without
upper-case translation
|
void |
receiveBuffer(DataHolder data)
Receive 3270 buffer from the terminal
|
void |
receiveBufferASIS(DataHolder data)
Receive 3270 buffer from the terminal without
upper-case translation
|
void |
send(byte[] data)
Send a 3270 data stream to the terminal.
|
void |
send(byte[] data,
java.util.BitSet options)
Send a 3270 data stream to the terminal with options.
|
void |
sendControl(java.util.BitSet options)
Send device controls to the terminal.
|
void |
sendControl(Cursor cursor)
Send cursor control to the terminal.
|
void |
sendControl(Cursor cursor,
java.util.BitSet options)
Send cursor control and device controls to the terminal.
|
void |
sendText(byte[] text)
Send text to the terminal.
|
void |
sendText(byte[] text,
java.util.BitSet options)
Send text to the terminal, specifying options.
|
void |
sendText(byte[] text,
Cursor cursor)
Send text to the terminal, specifying a cursor position.
|
void |
sendText(byte[] text,
Cursor cursor,
java.util.BitSet options)
Send text to the terminal, specifying cursor position and options.
|
void |
sendText(java.lang.String text,
java.util.BitSet options)
Send text to the terminal, specifying options.
|
void |
sendTextString(java.lang.String text)
Send text to the terminal.
|
void |
sendTextString(java.lang.String text,
Cursor cursor)
Send text to the terminal, specifying a cursor position.
|
void |
sendTextString(java.lang.String text,
Cursor cursor,
java.util.BitSet options)
Send text to the terminal, specifying cursor position and options.
|
void |
setNextChannel(Channel nextChan)
Set the Channel to be used with the next transaction to be run on
input from the terminal.
|
void |
setNextCOMMAREA(byte[] nextCOMMAREA)
Set the COMMAREA to be used with the next transaction to be run on
input from the terminal.
|
void |
setNextTransaction(java.lang.String nextTransaction)
Set the next transaction to be run on input from the terminal.
|
void |
setTCTUA(byte[] data)
Update the contents of the TCTUA from an array of bytes.
|
void |
waitTerminal()
Deprecated.
All methods operating on this class are synchronous so there
is no need to wait for them to complete.
|
public void clear() throws InvalidRequestException
erase()
.InvalidRequestException
- INVREQ occurred.public void converse(DataHolder data) throws EndOfChainIndicatorException, InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data to writeEndOfChainIndicatorException
- EOC occurred.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.public void converseASIS(DataHolder data) throws EndOfChainIndicatorException, InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data to writeEndOfChainIndicatorException
- EOC occurred.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.public void erase() throws InvalidRequestException
InvalidRequestException
- INVREQ occurred.public void getTCTUA(TCTUAHolder holder)
The corresponding setTCTUA(byte[]) method must be called before returning from the task or invoking another program, as the Java TCTUA is a copy of the "real" TCTUA and any changes made in Java code must be reflected back into the "real" TCTUA before another program is invoked which would not see the current program's copy of the TCTUA.
holder
- a holder for the TCTUA.
If there is no TCTUA
defined for the terminal, a byte[] of length 0 is returned as the value of
the holder.public byte[] getTERMCODE()
public void receive(DataHolder data) throws EndOfChainIndicatorException, InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data returned from the terminalEndOfChainIndicatorException
- EOCInvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.public void receiveASIS(DataHolder data) throws EndOfChainIndicatorException, InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data returned from the terminalEndOfChainIndicatorException
- EOC occurred.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.public void receiveBuffer(DataHolder data) throws EndOfChainIndicatorException, InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data returned from the terminalEndOfChainIndicatorException
- EOC occurred.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.public void receiveBufferASIS(DataHolder data) throws EndOfChainIndicatorException, InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data returned from the terminalEndOfChainIndicatorException
- EOC occurredInvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.public void send(byte[] data) throws InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data to send to the terminalInvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.public void send(byte[] data, java.util.BitSet options) throws InvalidRequestException, LengthErrorException, NotAllocatedException, TerminalException
data
- the data to send to the terminaloptions
- the terminal control bits to setInvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAllocatedException
- NOTALLOC occurred.TerminalException
- TERMERR occurred.TerminalSendBits
public void sendControl(Cursor cursor) throws InvalidRequestException
cursor
- the cursor to send to the terminalInvalidRequestException
- INVREQ occurred.public void sendControl(Cursor cursor, java.util.BitSet options) throws InvalidRequestException
cursor
- the cursor to send to the terminaloptions
- the terminal control bits to setInvalidRequestException
- INVREQ occurred.TerminalSendControlBits
public void sendControl(java.util.BitSet options) throws InvalidRequestException
options
- the terminal control bits to setInvalidRequestException
- INVREQ occurred.TerminalSendControlBits
public void sendText(byte[] text) throws InvalidRequestException, LengthErrorException
text
- The text to be sent.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.public void sendText(byte[] text, Cursor cursor) throws InvalidRequestException, LengthErrorException
text
- The text to be sent.cursor
- The cursor position.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.public void sendText(byte[] text, Cursor cursor, java.util.BitSet options) throws InvalidRequestException, LengthErrorException
text
- The text to be sent.cursor
- The cursor position.options
- The options.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.TerminalSendTextBits
public void sendText(byte[] text, java.util.BitSet options) throws InvalidRequestException, LengthErrorException
text
- The text to be sent.options
- The options.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.TerminalSendTextBits
public void sendTextString(java.lang.String text) throws InvalidRequestException, LengthErrorException
text
- The text String to be sent.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.public void sendTextString(java.lang.String text, Cursor cursor) throws InvalidRequestException, LengthErrorException
text
- The text to be sent.cursor
- The cursor position.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.public void sendTextString(java.lang.String text, Cursor cursor, java.util.BitSet options) throws InvalidRequestException, LengthErrorException
text
- The text String to be sent.cursor
- The cursor position.options
- The options.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.TerminalSendTextBits
public void sendText(java.lang.String text, java.util.BitSet options) throws InvalidRequestException, LengthErrorException
text
- The text String to be sent.options
- The options.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.TerminalSendTextBits
public void setNextCOMMAREA(byte[] nextCOMMAREA)
nextCOMMAREA
- The COMMAREA that is to be supplied to the next
transaction.public void setNextTransaction(java.lang.String nextTransaction)
nextTransaction
- The name of the next transaction to be run from
the terminal.public void setNextChannel(Channel nextChan)
nextChan
- the Channel that is to be supplied to the next
transaction.public void setTCTUA(byte[] data) throws InvalidRequestException
This method must be called before returning from the task or invoking another program, as the Java TCTUA is a copy of the "real" TCTUA and any changes made in Java code must be reflected back into the "real" TCTUA before another program is invoked which would not see the current program's copy of the TCTUA.
data
- the new data to be copied into the TCTUA.InvalidRequestException
- the terminal does not have a TCTUA@Deprecated public void waitTerminal()
public byte getAIDbyte()
AIDValue