com.ibm.cics.server
Class TerminalPrincipalFacility

java.lang.Object
  extended bycom.ibm.cics.server.API
      extended bycom.ibm.cics.server.Terminal
          extended bycom.ibm.cics.server.TerminalPrincipalFacility
All Implemented Interfaces:
TerminalSendBits, TerminalSendCommonBits
Direct Known Subclasses:
TerminalPrincipalFacilityExtended

public class TerminalPrincipalFacility
extends Terminal
implements TerminalSendBits

This Class provides the Java interface to a CICS Terminal.


Field Summary
 
Fields inherited from interface com.ibm.cics.server.TerminalSendBits
FRSET, NUMBER_OF_BITS, WAIT
 
Fields inherited from interface com.ibm.cics.server.TerminalSendCommonBits
ALARM, ERASE, FREEKB, PRINT
 
Method Summary
 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 uppercase 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 uppercase translation
 void receiveBuffer(DataHolder data)
          Receive 3270 buffer from the terminal
 void receiveBufferASIS(DataHolder data)
          Receive 3270 buffer from the terminal without uppercase 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 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.
 
Methods inherited from class com.ibm.cics.server.Terminal
getCursor, getName, getUser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public void clear()
           throws InvalidRequestException
Clear the terminal. This method is equivalent to erase().

Throws:
InvalidRequestException - INVREQ occurred.

converse

public void converse(DataHolder data)
              throws EndOfChainIndicatorException,
                     InvalidRequestException,
                     LengthErrorException,
                     NotAllocatedException,
                     TerminalException
Send then receive 3270 data stream from the terminal

Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

converseASIS

public void converseASIS(DataHolder data)
                  throws EndOfChainIndicatorException,
                         InvalidRequestException,
                         LengthErrorException,
                         NotAllocatedException,
                         TerminalException
Send then receive 3270 data stream from the terminal without uppercase translation

Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

erase

public void erase()
           throws InvalidRequestException
Erase the terminal.

Throws:
InvalidRequestException - INVREQ occurred.

getTCTUA

public void getTCTUA(TCTUAHolder holder)
Return a copy of the Terminal User Area (TCTUA).

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.


getTERMCODE

public byte[] getTERMCODE()
Return the TERMCODE for the principal facility.

Returns:
the TERMCODE as an array of bytes.

receive

public void receive(DataHolder data)
             throws EndOfChainIndicatorException,
                    InvalidRequestException,
                    LengthErrorException,
                    NotAllocatedException,
                    TerminalException
Receive 3270 data stream from the terminal

Throws:
EndOfChainIndicatorException
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

receiveASIS

public void receiveASIS(DataHolder data)
                 throws EndOfChainIndicatorException,
                        InvalidRequestException,
                        LengthErrorException,
                        NotAllocatedException,
                        TerminalException
Receive 3270 data stream from the terminal without uppercase translation

Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

receiveBuffer

public void receiveBuffer(DataHolder data)
                   throws EndOfChainIndicatorException,
                          InvalidRequestException,
                          LengthErrorException,
                          NotAllocatedException,
                          TerminalException
Receive 3270 buffer from the terminal

Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

receiveBufferASIS

public void receiveBufferASIS(DataHolder data)
                       throws EndOfChainIndicatorException,
                              InvalidRequestException,
                              LengthErrorException,
                              NotAllocatedException,
                              TerminalException
Receive 3270 buffer from the terminal without uppercase translation

Throws:
EndOfChainIndicatorException - EOC occurred
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

send

public void send(byte[] data)
          throws InvalidRequestException,
                 LengthErrorException,
                 NotAllocatedException,
                 TerminalException
Send a 3270 data stream to the terminal.

Throws:
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

send

public void send(byte[] data,
                 java.util.BitSet options)
          throws InvalidRequestException,
                 LengthErrorException,
                 NotAllocatedException,
                 TerminalException
Send a 3270 data stream to the terminal with options.

Throws:
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
TerminalException - TERMERR occurred.

sendControl

public void sendControl(Cursor cursor)
                 throws InvalidRequestException
Send cursor control to the terminal.

Throws:
InvalidRequestException - INVREQ occurred.

sendControl

public void sendControl(Cursor cursor,
                        java.util.BitSet options)
                 throws InvalidRequestException
Send cursor control and device controls to the terminal.

Throws:
InvalidRequestException - INVREQ occurred.

sendControl

public void sendControl(java.util.BitSet options)
                 throws InvalidRequestException
Send device controls to the terminal.

Throws:
InvalidRequestException - INVREQ occurred.

sendText

public void sendText(byte[] text)
              throws InvalidRequestException,
                     LengthErrorException
Send text to the terminal.

Parameters:
text - The text to be sent.
Throws:
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.

sendText

public void sendText(byte[] text,
                     Cursor cursor)
              throws InvalidRequestException,
                     LengthErrorException
Send text to the terminal, specifying a cursor position.

Parameters:
text - The text to be sent.
cursor - The cursor position.
Throws:
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.

sendText

public void sendText(byte[] text,
                     Cursor cursor,
                     java.util.BitSet options)
              throws InvalidRequestException,
                     LengthErrorException
Send text to the terminal, specifying cursor position and options.

Parameters:
text - The text to be sent.
cursor - The cursor position.
options - The options.
Throws:
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.

sendText

public void sendText(byte[] text,
                     java.util.BitSet options)
              throws InvalidRequestException,
                     LengthErrorException
Send text to the terminal, specifying options.

Parameters:
text - The text to be sent.
options - The options.
Throws:
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.

setNextCOMMAREA

public void setNextCOMMAREA(byte[] nextCOMMAREA)
Set the COMMAREA to be used with the next transaction to be run on input from the terminal.

Parameters:
nextCOMMAREA - The COMMAREA that is to be supplied to the next transaction.

setNextTransaction

public void setNextTransaction(java.lang.String nextTransaction)
Set the next transaction to be run on input from the terminal.

Parameters:
nextTransaction - The name of the next transaction to be run from the terminal.

setNextChannel

public void setNextChannel(Channel nextChan)
Set the Channel to be used with the next transaction to be run on input from the terminal.


setTCTUA

public void setTCTUA(byte[] data)
              throws InvalidRequestException
Update the contents of the TCTUA from an array of bytes.

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.

Parameters:
data - the new data to be copied into the TCTUA.
Throws:
InvalidRequestException - the terminal does not have a TCTUA

waitTerminal

public void waitTerminal()
Deprecated. All methods operating on this class are synchronous so there is no need to wait for them to complete.

Wait for a terminal operation to complete.


getAIDbyte

public byte getAIDbyte()
Return the AID (Action Identifier) key last entered by the user at the terminal. A set of constants for interpretation of the AID byte value is provided in interface AIDValue. This method is new in CICS TS 2.1.

Returns:
byte value of AID key
See Also:
AIDValue