Sun Adapter for CICS API

com.stc.eways.cics
Class SBYNDCicsProxy

java.lang.Object
  extended by com.stc.eways.cics.SBYNDCicsProxy
All Implemented Interfaces:
SBYNDCicsProxyConstants

public class SBYNDCicsProxy
extends java.lang.Object
implements SBYNDCicsProxyConstants

The SBYNDCicsProxy class represents a connection to the SBYND CICS Listener; methods are implemented and exposed to enable the caller to invoke CICS transaction programs on the host (via SBYND CICS Listener), passing data to and get result from it;


Field Summary
 
Fields inherited from interface com.stc.eways.cics.SBYNDCicsProxyConstants
CALL_ERROR, CALL_OK, CICSLSTNR_ASYNC_RSP_MSG_PROP_COMMLEN, CICSLSTNR_ASYNC_RSP_MSG_PROP_MSG, CICSLSTNR_ASYNC_RSP_MSG_PROP_PROGRAM, CICSLSTNR_ASYNC_RSP_MSG_PROP_RC, CICSLSTNR_ASYNC_RSP_MSG_PROP_RETURNTIME, CICSLSTNR_ASYNC_RSP_MSG_PROP_SC, CICSLSTNR_ASYNC_RSP_MSG_PROP_STARTTIME, CICSLSTNR_ASYNC_RSP_MSG_PROP_TOPIC, CICSLSTNR_C_ACR_OFFSET_APPL_TIMEOUT, CICSLSTNR_C_ACR_OFFSET_COMM_LEN, CICSLSTNR_C_ACR_OFFSET_HEADER, CICSLSTNR_C_ACR_OFFSET_PADCHAR, CICSLSTNR_C_ACR_OFFSET_PASSWORD, CICSLSTNR_C_ACR_OFFSET_PAYLOAD_LEN, CICSLSTNR_C_ACR_OFFSET_PROGNAME, CICSLSTNR_C_ACR_OFFSET_RC, CICSLSTNR_C_ACR_OFFSET_REQCODE, CICSLSTNR_C_ACR_OFFSET_RM, CICSLSTNR_C_ACR_OFFSET_USERID, CICSLSTNR_C_BUFFER_SIZE, CICSLSTNR_C_CONTROLRECORD_ENCODING, CICSLSTNR_C_IC_RECORD_DELIMITER, CICSLSTNR_C_IC_RECORD_SIZE, CICSLSTNR_C_ICR_OFFSET_APPL_TIMEOUT, CICSLSTNR_C_ICR_OFFSET_FILLER, CICSLSTNR_C_ICR_OFFSET_LISTENER_TIMEOUT, CICSLSTNR_C_ICR_OFFSET_PASSWD, CICSLSTNR_C_ICR_OFFSET_PAYLOAD_DELIMETER, CICSLSTNR_C_ICR_OFFSET_POLLING_RATE, CICSLSTNR_C_ICR_OFFSET_STARTUP_DELAY, CICSLSTNR_C_ICR_OFFSET_STARTUP_TYPE, CICSLSTNR_C_ICR_OFFSET_STARTUP_TYPE_DELIMETER, CICSLSTNR_C_ICR_OFFSET_TRANSID, CICSLSTNR_C_ICR_OFFSET_TRANSID_DELIMETER, CICSLSTNR_C_ICR_OFFSET_TRANSPORT_TIMEOUT, CICSLSTNR_C_ICR_OFFSET_USERID, CICSLSTNR_C_MIN_ACR_HEADER_SIZE, CICSLSTNR_C_SEEBEYOND_LISTENER, CICSLSTNR_C_SPACE, CICSLSTNR_C_TRANSACTION_GATEWAY, CICSLSTNR_E_ACR_INCONSISTENT, CICSLSTNR_E_ACR_LEN_SHORTER_THAN_MIN_ACR_LEN, CICSLSTNR_E_ASYNCCALL_LIST_NOT_AVAILABLE, CICSLSTNR_E_ASYNCCALL_NOT_AVAILABLE, CICSLSTNR_E_ASYNCCALLHANDLER_REQUIRED, CICSLSTNR_E_BYTESAVAILABLE, CICSLSTNR_E_CICS_SERVER_REQUIRED, CICSLSTNR_E_CLIENT_NOT_CONNECTED, CICSLSTNR_E_CLOSE_SOCKET, CICSLSTNR_E_CONFIG_CLONE_NOT_AVAILABLE_ASYNC_EXECUTE, CICSLSTNR_E_CONFIG_INVALID_PARAM, CICSLSTNR_E_CONNECT_BAD_RESPONSE, CICSLSTNR_E_CONNECT_FAILED_EMPTY_TRANSID, CICSLSTNR_E_CONNECT_FAILED_GEN_INITREC_ERROR, CICSLSTNR_E_CONNECT_FAILED_INVALID_TRANSID, CICSLSTNR_E_CONNECT_GET_NACK_FROM_LISTENER, CICSLSTNR_E_CONNECT_UNEXPECTED_RESPONSE, CICSLSTNR_E_CONNECTION, CICSLSTNR_E_CTG_GATEWAY_ERROR, CICSLSTNR_E_DISCONNECT_FAILED, CICSLSTNR_E_ETD_INSTANCE_NOT_AVAILABLE_WHEN_CHECK_CONN, CICSLSTNR_E_ETD_INSTANCE_NOT_AVAILABLE_WHEN_CLOSE_CONN, CICSLSTNR_E_ETD_INSTANCE_NOT_AVAILABLE_WHEN_OPEN_CONN, CICSLSTNR_E_EXCEPTION_REMOVING_ASYNCCALL, CICSLSTNR_E_EXECUTE_BAD_RESPONSE, CICSLSTNR_E_EXECUTE_BAD_RESULT, CICSLSTNR_E_EXECUTE_GET_RESULT, CICSLSTNR_E_EXECUTE_REQ_NACKED, CICSLSTNR_E_EXECUTE_TIMEOUT, CICSLSTNR_E_EXECUTE_UNEXPECTED_RESPONSE, CICSLSTNR_E_EXPECTING_LSTNR_RSP4SHUTDOWN, CICSLSTNR_E_FAILED_RECV_LSTNR_RSP4SHUTDOWN, CICSLSTNR_E_INVALID_ACR_LENGTH_HEADER, CICSLSTNR_E_INVALID_ACR_PAYLOADLEN, CICSLSTNR_E_INVALID_COMMAREA_LENGTH, CICSLSTNR_E_INVALID_CONNECTOR_TYPE, CICSLSTNR_E_INVALID_OPERATION, CICSLSTNR_E_INVALID_OPERATION_4_CTG, CICSLSTNR_E_INVALID_OPERATION_4_LISTENER, CICSLSTNR_E_INVALID_OPERATION_ON_INBOUND_RECORD, CICSLSTNR_E_INVALID_PADCHAR, CICSLSTNR_E_INVALID_REQUEST_CODE, CICSLSTNR_E_INVALID_RETURN_CODE, CICSLSTNR_E_INVALID_TIMEOUT, CICSLSTNR_E_ITERATOR_NOT_AVAILABLE_WHEN_INVOKE, CICSLSTNR_E_MISSING_PROGNAME_WHEN_PREPARE_ACR, CICSLSTNR_E_PROGRAM_REQUIRED, CICSLSTNR_E_RECEV_RESPONSE_SOCKETEXCEPTION, CICSLSTNR_E_RECEV_RESPONSE_TIMEOUT, CICSLSTNR_E_RECV, CICSLSTNR_E_REMOVE_ASYNCCALL_OUTSTANDING, CICSLSTNR_E_SEND, CICSLSTNR_E_SENDREQUEST_PAYLOAD_LENGTH_CHANGED, CICSLSTNR_E_UNEXPECTED_RECORD, CICSLSTNR_PARAM_CONN_TRANSPORT, CICSLSTNR_PARAM_HOST, CICSLSTNR_PARAM_KEEPALIVE, CICSLSTNR_PARAM_LISTENERTIMEOUT, CICSLSTNR_PARAM_NODELAY, CICSLSTNR_PARAM_PADCHAR, CICSLSTNR_PARAM_POLLINGRATE, CICSLSTNR_PARAM_PORT, CICSLSTNR_PARAM_RECVBUFSIZE, CICSLSTNR_PARAM_SBYNDLISTENER_TRANSID, CICSLSTNR_PARAM_SENDBUFSIZE, CICSLSTNR_PARAM_STARTDELAY, CICSLSTNR_PARAM_STARTTYPE, CICSLSTNR_PARAM_TPTIMEOUT, CICSLSTNR_PARAM_TRANSPORTTIMEOUT, CICSLSTNR_T_CHECK_CONNECTION, CICSLSTNR_T_CONNECT_ALREADY, CICSLSTNR_T_CONNECT_ATTEMPTED, CICSLSTNR_T_CONNECT_DONE, CICSLSTNR_T_CONNECTION_ESTABLISH_FAILED, CICSLSTNR_T_CONNECTION_REUSE, CICSLSTNR_T_EMPTY_ENCODING_DEF_ASSUMED, CICSLSTNR_T_EXECUTE_ASYNC_CALL_RESPONSED_WITH_OK, CICSLSTNR_T_RECV_MSG_EOF, CICSLSTNR_T_RECV_MSG_OK, CICSLSTNR_T_RECV_MSG_PARTIAL, CICSLSTNR_T_RECV_MSG_TIMEOUT, CICSLSTNR_T_REMOVED_ASYNCCALL, CICSLSTNR_T_REMOVING_ASYNCCALL, CICSLSTNR_T_SHUTDOWN_LISTNER_OK, CICSLSTNR_T_SHUTDOWN_LISTNER_RSP_WITH_ERROR, messages, SBYND_LISTENER_RC_AUTHENTICATION_FAILURE, SBYND_LISTENER_RC_BAD_COMMAREA, SBYND_LISTENER_RC_CANNOT_GET_INIT_PARAM, SBYND_LISTENER_RC_ERR_SET_NON_BLOCKING, SBYND_LISTENER_RC_INIT_ERR_STARTUP_TYPE_IC, SBYND_LISTENER_RC_INIT_ERR_STARTUP_TYPE_TD, SBYND_LISTENER_RC_INVALID_APPL_TIMEOUT, SBYND_LISTENER_RC_INVALID_CA_LENGTH, SBYND_LISTENER_RC_INVALID_LISTENER_TIMEOUT, SBYND_LISTENER_RC_INVALID_MSG_LENGTH, SBYND_LISTENER_RC_INVALID_PROGNAME, SBYND_LISTENER_RC_INVALID_REQCODE, SBYND_LISTENER_RC_INVALID_RSPCODE, SBYND_LISTENER_RC_INVALID_TRANSPORT_TIMEOUT, SBYND_LISTENER_RC_OK, SBYND_LISTENER_RC_PARTIAL_MSG, SBYND_LISTENER_RC_PASSWD_ENCRYPT_ERROR, SBYND_LISTENER_RC_PROG_LINK_ERROR, SBYND_LISTENER_RC_TRANS_START_ERROR, SBYND_LISTENER_REQCODE_DESC_LSTNR_RETURN4SYNC, SBYND_LISTENER_REQCODE_DESC_LSTNR_RSP4ASYNC, SBYND_LISTENER_REQCODE_DESC_LSTNR_RSP4ASYNCSTART, SBYND_LISTENER_REQCODE_DESC_LSTNR_RSP4INIT, SBYND_LISTENER_REQCODE_DESC_LSTNR_RSP4SHUTDOWN, SBYND_LISTENER_REQCODE_DESC_LSTNR_RSP4SYNC, SBYND_LISTENER_REQCODE_DESC_REQ_ASYNC, SBYND_LISTENER_REQCODE_DESC_REQ_SYNC, SBYND_LISTENER_REQCODE_DESC_REQ4SHUTDOWN, SBYND_LISTENER_REQCODE_DESC_REQISCONNECTED, SBYND_LISTENER_REQCODE_DESC_RSP4ASYNCLINKRSP, SBYND_LISTENER_REQCODE_DESC_RSP4RETURN, SBYND_LISTENER_REQCODE_LSTNR_RETURN4SYNC, SBYND_LISTENER_REQCODE_LSTNR_RSP4ASYNC, SBYND_LISTENER_REQCODE_LSTNR_RSP4ASYNCSTART, SBYND_LISTENER_REQCODE_LSTNR_RSP4INIT, SBYND_LISTENER_REQCODE_LSTNR_RSP4SHUTDOWN, SBYND_LISTENER_REQCODE_LSTNR_RSP4SYNC, SBYND_LISTENER_REQCODE_LSTNR_RSPISCONNECTED, SBYND_LISTENER_REQCODE_REQ_ASYNC, SBYND_LISTENER_REQCODE_REQ_SYNC, SBYND_LISTENER_REQCODE_REQ4SHUTDOWN, SBYND_LISTENER_REQCODE_REQISCONNECTED, SBYND_LISTENER_REQCODE_RSP4ASYNCLINKRSP, SBYND_LISTENER_REQCODE_RSP4RETURN
 
Constructor Summary
SBYNDCicsProxy(SBYNDCicsProxyConfig config)
           
 
Method Summary
 void appendSendBuffer(byte[] buffer)
          append the Outbound buffer.
 int bytesAvailable()
          return the bytes available for read;
 boolean checkConnection()
          Check the connection;
 void connect()
          Establish connection with the CICS host, a multi-step procedure: (1) connect to host and port with TCP/IP socket (connect to IBM CICS listener); (2) send Initialization Control Record over to SBYND CICS Listener; (3) get ACK from SBYND CICS Listener;
 void disconnect()
          Disconnect with the CICS host, a multi-step procedure: (1) send shut down request - an Application Control Record with shutdown request code to SBYND CICS Listener; (2) get ACK from SBYND CICS Listener indicating shutdown OK; (3) close the socket; According to the protocol, if error occurred during the course of sending shutdown request or receiving ACK for the shutdown request, the control will proceed and the socket will be closed anyway, so next time the connection is established both client and the SBYND CICS Listener can be in sync;
 byte[] getCommArea()
           
 int getCommAreaLength()
           
 java.lang.String getPassword()
           
 int getPayloadLength()
           
 java.lang.String getProgram()
           
 java.lang.String getProgramName()
           
 byte[] getReceiveBuffer()
          return the Inbound buffer.
 int getRequestCode()
          Return the request code from the response (from SBYND CICS Listener) assuming the response is in the inbound buffer;
 java.lang.String getRequestDesc()
           
 boolean getResponse(int timeout)
          Get an ACR from the listener, assuming ACR is properly received, put it in the inbound buffer; how the incoming ACR are parsed depends on the request code, if it is SBYND_LISTENER_REQCODE_LSTNR_RETURN4SYNC, receive payload into CommArea, otherwise, all the meta data are in the _InboundBuffer; for request code SBYND_LISTENER_REQCODE_LSTNR_RETURN4SYNC, need to use a different timeout, TP timeout, since TP can be running like 2 hr, so when getResponse() is used to receive a result from a sync TP, a TP timeout will be used instead of the TRANSPORT_TIMEOUT;
 int getReturnCode()
           
 java.lang.String getReturnMessage()
           
 byte[] getSendBuffer()
          return the Outbound Buffer.
 java.lang.String getUserId()
           
 void prepareAPCRecord(java.lang.String progname, int appltimeout, int requestcode, int errorcode, java.lang.String errortext)
          Form an APC record in the outbound buffer whenever the payload - i.e.
 void prepareICRecord()
          Form an IC record in the outbound buffer and this will be sent out via subsequent sendRequest() call;
 int receive()
          Read bytes into the _InboundBuffer start at 0 up to number of bytes available; Grow _InboundBuffer if necessary; Will adjust _InboundContentLen accordingly;
 int receive(byte[] buffer)
          This is supposed to be used with programmer provided buffer only; Should not be used with the _InboundBuffer; Read bytes until the buffer's length or EOF reached or timed out;
 int receive(byte[] buffer, int offset, int length)
          This is supposed to be used with programmer provided buffer only; Should not be used with the _InboundBuffer; Read bytes until the length or EOF reached or timed out;
 int receive(int offset, int length)
          Read bytes into the _InboundBuffer start at offset up to offset + length, the read will block until length read or EOF reached or timed out; _InboundBuffer will grow accordingly; Will adjust _InboundContentLen accordingly;
 int receiveRecord(int timeout)
          Read a message from the listener, the message is in inbound buffer.
 void reconnect()
           
 void send()
          send the Outbound buffer's actual content.
 void send(byte[] buffer)
          send the specified buffer.
 void send(byte[] buffer, int offset, int length)
          send the specified buffer.
 void send(int offset, int length)
          send the Outbound buffer.
 void sendRequest()
          Send an ACR to the listener, assuming ACR is properly prepared and is in outbound buffer; sendRequest() only send ACR, if a response is expected, need to call getResponse() sebsequently;
 void setCommArea(byte[] byteArray)
           
 void setCommAreaLength(int i)
           
 void setPassword(java.lang.String s)
           
 void setProgram(java.lang.String s)
           
 void setReceiveBuffer(byte[] buffer)
          set the Inbound buffer.
 void setSendBuffer(byte[] buffer)
          set the Outbound buffer.
 void setUserId(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SBYNDCicsProxy

public SBYNDCicsProxy(SBYNDCicsProxyConfig config)
Method Detail

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String s)

getProgram

public java.lang.String getProgram()

setProgram

public void setProgram(java.lang.String s)

getUserId

public java.lang.String getUserId()

setUserId

public void setUserId(java.lang.String s)

getCommArea

public byte[] getCommArea()

setCommArea

public void setCommArea(byte[] byteArray)

getCommAreaLength

public int getCommAreaLength()

setCommAreaLength

public void setCommAreaLength(int i)

getSendBuffer

public byte[] getSendBuffer()
return the Outbound Buffer.

Returns:
byte[] Outbound buffer;

getReceiveBuffer

public byte[] getReceiveBuffer()
return the Inbound buffer.

Returns:
byte[] Inbound buffer;

setSendBuffer

public void setSendBuffer(byte[] buffer)
set the Outbound buffer.

Parameters:
byte[] - buffer;

appendSendBuffer

public void appendSendBuffer(byte[] buffer)
append the Outbound buffer.

Parameters:
byte[] - buffer;

setReceiveBuffer

public void setReceiveBuffer(byte[] buffer)
set the Inbound buffer.

Parameters:
byte[] - buffer;

send

public void send()
          throws CicsClientException
send the Outbound buffer's actual content.

Throws:
CollabConnException - if there is an error in the underlying socket,
CollabDataException - if there is an error in the _OutboundBuffer,
CicsClientException

send

public void send(byte[] buffer)
          throws CicsClientException
send the specified buffer.

Parameters:
buffer - - send the content of the buffer;
Throws:
CollabConnException - if there is an error in the underlying socket,
CollabDataException - if there is an error in the _OutboundBuffer,
CicsClientException

send

public void send(int offset,
                 int length)
          throws CicsClientException
send the Outbound buffer.

Parameters:
offset - - offset for the Outbound buffer;
length - - number of bytes to be sent starting from offset;
Throws:
CollabConnException - if there is an error in the underlying socket,
CollabDataException - if there is an error in the _OutboundBuffer,
CicsClientException

send

public void send(byte[] buffer,
                 int offset,
                 int length)
          throws CicsClientException
send the specified buffer.

Parameters:
buffer - - the buffer to be sent;
offset - - the offset for the buffer starting from where the content will be sent;
length - - number of bytes to sent starting from offset;
Throws:
CollabConnException - if there is an error in the underlying socket,
CollabDataException - if there is an error in the _OutboundBuffer,
CicsClientException

receive

public int receive()
            throws CicsClientException,
                   SBYNDCicsProxyTimeoutException
Read bytes into the _InboundBuffer start at 0 up to number of bytes available; Grow _InboundBuffer if necessary; Will adjust _InboundContentLen accordingly;

Returns:
the actual bytes read, or -1 for EOF;
Throws:
CollabConnException - if there is an error in the underlying socket;
CollabDataException - if there is an error in the receive operation;
CicsClientException
SBYNDCicsProxyTimeoutException

receive

public int receive(int offset,
                   int length)
            throws CicsClientException,
                   SBYNDCicsProxyTimeoutException
Read bytes into the _InboundBuffer start at offset up to offset + length, the read will block until length read or EOF reached or timed out; _InboundBuffer will grow accordingly; Will adjust _InboundContentLen accordingly;

Parameters:
offset - - starting position in Inbound buffer for incoming bytes;
length - - bytes to be read;
Returns:
the actual bytes read, or -1 for EOF;
Throws:
CollabConnException - if there is an error in the underlying socket;
CollabDataException - if there is an error in the receive operation;
SBYNDCicsProxyTimeoutException - if socket read is timed out;
CicsClientException

receive

public int receive(byte[] buffer)
            throws CicsClientException,
                   SBYNDCicsProxyTimeoutException
This is supposed to be used with programmer provided buffer only; Should not be used with the _InboundBuffer; Read bytes until the buffer's length or EOF reached or timed out;

Parameters:
buffer - - the buffer for incoming bytes - will read until the buffer filled up;
Returns:
the actual bytes read, or -1 if EOF reached;
Throws:
CollabConnException - if there is an error in the underlying socket;
CollabDataException - if there is an error in the receive operation;
SBYNDCicsProxyTimeoutException - if socket read is timed out;
CicsClientException

receive

public int receive(byte[] buffer,
                   int offset,
                   int length)
            throws CicsClientException,
                   SBYNDCicsProxyTimeoutException
This is supposed to be used with programmer provided buffer only; Should not be used with the _InboundBuffer; Read bytes until the length or EOF reached or timed out;

Parameters:
buffer - - buffer for incoming bytes;
offset - - starting point where incoming data is received;
length - - number of bytes to read;
Returns:
the actual bytes read;
Throws:
CollabConnException - if there is an error in the underlying socket;
CollabDataException - if there is an error in the receive operation;
SBYNDCicsProxyTimeoutException - if socket read is timed out;
CicsClientException

connect

public void connect()
             throws CicsClientException
Establish connection with the CICS host, a multi-step procedure: (1) connect to host and port with TCP/IP socket (connect to IBM CICS listener); (2) send Initialization Control Record over to SBYND CICS Listener; (3) get ACK from SBYND CICS Listener;

Throws:
CollabConnException - if there is an error in the underlying socket;
CollabDataException - if there is an error other than connection problem;
CicsClientException

sendRequest

public void sendRequest()
                 throws CicsClientException
Send an ACR to the listener, assuming ACR is properly prepared and is in outbound buffer; sendRequest() only send ACR, if a response is expected, need to call getResponse() sebsequently;

Throws:
CollabConnException - if error for the connection;
CollabDataException - if error in data;
CicsClientException

getResponse

public boolean getResponse(int timeout)
                    throws CicsClientException,
                           SBYNDCicsProxyTimeoutException
Get an ACR from the listener, assuming ACR is properly received, put it in the inbound buffer; how the incoming ACR are parsed depends on the request code, if it is SBYND_LISTENER_REQCODE_LSTNR_RETURN4SYNC, receive payload into CommArea, otherwise, all the meta data are in the _InboundBuffer; for request code SBYND_LISTENER_REQCODE_LSTNR_RETURN4SYNC, need to use a different timeout, TP timeout, since TP can be running like 2 hr, so when getResponse() is used to receive a result from a sync TP, a TP timeout will be used instead of the TRANSPORT_TIMEOUT;

Parameters:
timeout - - timeout for the blocking read;
Returns:
true - a ACR received properly and is in Inbound buffer.
Throws:
CollabConnException - if error for the connection;
CollabDataException - if error in data;
SBYNDCicsProxyTimeoutException - if timeout while expecting a response from the listener;
CicsClientException

receiveRecord

public int receiveRecord(int timeout)
                  throws CicsClientException
Read a message from the listener, the message is in inbound buffer.

Parameters:
timeout - - the timeout for SOCKET_OPTION TIMEOUT - affect socket read;
Returns:
-1 - EOF w/o a complete message; -2 - Timeout w/o complete message; -3 - Partial Message received; -4 - Invalid ACR 0 - a complete message read in the buffer;
Throws:
CollabConnException - if error for the connection;
CollabDataException - if error in data;
CicsClientException

prepareICRecord

public void prepareICRecord()
                     throws CicsClientException
Form an IC record in the outbound buffer and this will be sent out via subsequent sendRequest() call;

Throws:
CollabDataException - if error in data;
CicsClientException

prepareAPCRecord

public void prepareAPCRecord(java.lang.String progname,
                             int appltimeout,
                             int requestcode,
                             int errorcode,
                             java.lang.String errortext)
                      throws CicsClientException
Form an APC record in the outbound buffer whenever the payload - i.e. COMMAREA is needed it will be send by a separate socket write;

Parameters:
progname - - the transaction program name;
appltimeout - - application timeout not used (reserved);
requestcode - - request code of the ACR;
errorcode - - error code of the ACR;
errortext - - error message (usually used when the ACR is an NACK);
Throws:
CollabDataException - if error in data;
CicsClientException

getReturnCode

public int getReturnCode()
                  throws CicsClientException
Throws:
CicsClientException

getReturnMessage

public java.lang.String getReturnMessage()
                                  throws CicsClientException
Throws:
CicsClientException

getRequestCode

public int getRequestCode()
                   throws CicsClientException
Return the request code from the response (from SBYND CICS Listener) assuming the response is in the inbound buffer;

Throws:
CicsClientException

getPayloadLength

public int getPayloadLength()
                     throws CicsClientException
Throws:
CicsClientException

getProgramName

public java.lang.String getProgramName()
                                throws CicsClientException
Throws:
CicsClientException

getRequestDesc

public java.lang.String getRequestDesc()
                                throws CicsClientException
Throws:
CicsClientException

reconnect

public void reconnect()
               throws CicsClientException
Throws:
CicsClientException

disconnect

public void disconnect()
                throws CicsClientException
Disconnect with the CICS host, a multi-step procedure: (1) send shut down request - an Application Control Record with shutdown request code to SBYND CICS Listener; (2) get ACK from SBYND CICS Listener indicating shutdown OK; (3) close the socket; According to the protocol, if error occurred during the course of sending shutdown request or receiving ACK for the shutdown request, the control will proceed and the socket will be closed anyway, so next time the connection is established both client and the SBYND CICS Listener can be in sync;

Throws:
CollabConnException - if there is an error in the underlying socket;
CollabDataException - if there is an error other than connection problem;
CicsClientException

checkConnection

public boolean checkConnection()
Check the connection;

Returns:
true - the connection is good as of last socket IO, false otherwise;
Throws:
CicsClientException - upon error

bytesAvailable

public int bytesAvailable()
                   throws CicsClientException
return the bytes available for read;

Throws:
CicsClientException

Sun Adapter for CICS API