CICS® Transaction Gateway Programming Reference v1.1.0.0

com.ibm.ctg.epi
Interface TerminalSession

All Known Subinterfaces:
TerminalInterface
All Known Implementing Classes:
EPITerminal, Terminal

public 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 occurred.
static int failed
          Transaction failed to start/complete or timed out.
static int idle
          Terminal idle.
static int server
          Terminal waiting for server.
static int start
          Terminal starting.
static int txnTimedOut
          A Transaction has timed out through readtimeout property but the application has not been informed as yet of the exception.
 
Method Summary
 EPISecurityAttrs changePassword(java.lang.String newPass)
          Allows you to change the password for a given userid and current password with the External Security Manager
 void connect()
          Connects the terminal to the server.
 void connect(int installTimeout)
          Connects an Extended terminal to the server, within a given timeout.
 void disconnect()
          Disconnects the terminal from the server.
 java.lang.String getPassword()
          Returns the password associated with the terminal, or null if the password is null or the terminal is a basic terminal.
 Screen getScreen()
          Returns the screen associated with the terminal.
 int getState()
          Returns the state of the terminal.
 java.lang.String getTermid()
          Returns the terminal id associated with the terminal.
 java.lang.String getUserid()
          Returns the userid associated with the terminal, or null if the userid is null or the terminal is a basic 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.
 void setPassword(java.lang.String password)
          Sets the password associated with the terminal.
 void setUserid(java.lang.String newUserid)
          Sets the userid associated with the terminal.
 EPISecurityAttrs verifyPassword()
          Verifies the userid and password with the External Security Manager
 

Field Detail

start

static final int start
Terminal starting.

See Also:
Constant Field Values

idle

static final int idle
Terminal idle.

See Also:
Constant Field Values

client

static final int client
Server expecting reply.

See Also:
Constant Field Values

server

static final int server
Terminal waiting for server.

See Also:
Constant Field Values

discon

static final int discon
Terminal disconnected.

See Also:
Constant Field Values

error

static final int error
An error has occurred.

See Also:
Constant Field Values

failed

static final int failed
Transaction failed to start/complete or timed out.

See Also:
Constant Field Values

txnTimedOut

static final int txnTimedOut
A Transaction has timed out through readtimeout property but the application has not been informed as yet of the exception.

See Also:
Constant Field Values
Method Detail

connect

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

connect

void connect(int installTimeout)
             throws java.io.IOException,
                    EPIException
Connects an Extended terminal to the server, within a given timeout.

Parameters:
installTimeout - Terminal Install timeout (0-3600 secs, 0 = infinite)
Throws:
java.io.IOException - if an error occurs
EPIException - if an error occurs

send

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

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

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

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

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

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

Returns:
the screen

getState

int getState()
Returns the state of the terminal.

Returns:
the state

verifyPassword

EPISecurityAttrs verifyPassword()
                                throws EPIGatewayException,
                                       EPISecurityException,
                                       java.io.IOException,
                                       TerminalException
Verifies the userid and password with the External Security Manager

Returns:
SecurityAttr object containing security information
Throws:
java.io.IOException - if an error occurs connecting to the gateway
EPISecurityException - if an ESI call fails
EPIGatewayException
TerminalException

changePassword

EPISecurityAttrs changePassword(java.lang.String newPass)
                                throws EPIGatewayException,
                                       EPISecurityException,
                                       java.io.IOException,
                                       TerminalException
Allows you to change the password for a given userid and current password with the External Security Manager

Returns:
SecurityAttr object containing security information
Throws:
java.io.IOException - if an error occurs connecting to the gateway
EPISecurityException - if an ESI call fails
EPIGatewayException
TerminalException

getTermid

java.lang.String getTermid()
Returns the terminal id associated with the terminal.

Returns:
the terminal id

setUserid

void setUserid(java.lang.String newUserid)
Sets the userid associated with the terminal. This won't be picked up until another send is done or the terminal is connected.

Invoking this method automatically flags the terminal as an extended type of terminal supporting the terminal features

Parameters:
newUserid - the userid.

setPassword

void setPassword(java.lang.String password)
Sets the password associated with the terminal. This won't be picked up until another send is done or the terminal is connected

Invoking this method automatically flags the terminal as an extended type of terminal supporting the terminal features

Parameters:
password - the password.

getUserid

java.lang.String getUserid()
Returns the userid associated with the terminal, or null if the userid is null or the terminal is a basic terminal.

Returns:
the userid.

getPassword

java.lang.String getPassword()
Returns the password associated with the terminal, or null if the password is null or the terminal is a basic terminal.

Returns:
the password.

©Copyright IBM Corp. 1994, 2014
Legal