CICS® Transaction Gateway Programming Reference V3.1

com.ibm.ctg.epi
Interface TerminalSession

All Known Subinterfaces:
TerminalInterface
All Known Implementing Classes:
EPITerminal

public abstract interface TerminalSession

This interface defines the behaviour of a terminal which is in session, ie: has an associated Session object. TerminalInterface extends this with functions that allow the Session object to be changed.


Field Summary
static int client
          server expecting reply
static int discon
          terminal disconnected
static int error
          an error has occured
static int idle
          terminal idle
static int server
          terminal waiting for server
static int start
          terminal starting
 
Method Summary
 void connect()
          Connects the terminal to the server.
 void disconnect()
          Disconnects the terminal from the server.
 Screen getScreen()
          Returns the screen associated with the terminal.
 int getState()
          Returns the state of the terminal.
 boolean queryATI()
          Returns a boolean indicating whether the terminal ATI state is enabled or disabled.
 void send()
          Sends the current screen to the server using the current Session.
 void send(java.lang.String transid, java.lang.String data)
          Starts a transaction on the server using the current Session.
 void setATI(boolean on)
          Sets the terminal ATI state to be enabled or disabled.
 

Field Detail

start

public static final int start
terminal starting

idle

public static final int idle
terminal idle

client

public static final int client
server expecting reply

server

public static final int server
terminal waiting for server

discon

public static final int discon
terminal disconnected

error

public static final int error
an error has occured
Method Detail

connect

public void connect()
             throws java.io.IOException,
                    EPIException
Connects the terminal to the server.
Throws:
java.io.IOException - if an error occurs
EPIException - if an error occurs

send

public void send(java.lang.String transid,
                 java.lang.String data)
          throws java.io.IOException,
                 EPIException
Starts a transaction on the server using the current Session.
Parameters:
transid - the transaction to start
data - the data to pass to the transaction
Throws:
java.io.IOException - if an error occurs
EPIException - if an error occurs

send

public void send()
          throws java.io.IOException,
                 EPIException
Sends the current screen to the server using the current Session. This method is used when the terminal state is not idle or the screen is already set up to start the next transaction.
Throws:
java.io.IOException - if an error occurs
EPIException - if an error occurs

disconnect

public void disconnect()
                throws java.io.IOException,
                       EPIException
Disconnects the terminal from the server.
Throws:
java.io.IOException - if an error occurs
EPIException - if an error occurs

queryATI

public boolean queryATI()
                 throws java.io.IOException,
                        EPIException
Returns a boolean indicating whether the terminal ATI state is enabled or disabled.
Returns:
true if ATI is enabled, false otherwise
Throws:
java.io.IOException - if an error occurs
EPIException - if an error occurs

setATI

public void setATI(boolean on)
            throws java.io.IOException,
                   EPIException
Sets the terminal ATI state to be enabled or disabled.
Parameters:
on - true to set ATI enabled, false otherwise
Throws:
java.io.IOException - if an error occurs
EPIException - if an error occurs

getScreen

public Screen getScreen()
Returns the screen associated with the terminal.
Returns:
the screen

getState

public int getState()
Returns the state of the terminal.
Returns:
the state

© Copyright IBM Corp. 1994, 1999