|
Sun Adapter for CICS API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.stc.eways.cics.CicsClientImpl
public class CicsClientImpl
The CicsClient class represents
an OTD through which a collaboration can invoke transaction
programs on a CICS server;
nodes and methods are exposed so that collaboration can
conveniently prepare a request to a CICS program and
invoke the program and get result from the program;
in the current implementation, there are two underlying transport
mechanism can be used to achieve the remote invoking of CICS
programs:
(1) CTG - IBM's CICS Transaction Gateway
(2) SBYND CICS Listener - SeeBeyond CICS Listener - a light
weighted propritary protocol based on TCP/IP;
note that, the configuration parameters can be roughly categorized
into :
CTG specific;
SBYND CICS Listener specific;
Needed for both CTG and SBYND CICS Listener;
Also, the exposed CicsClient methods are categorized as:
CTG specific, such as getServerList();
SBYND CICS Listener specific, such as prepareAPCRecord(),
returnCodeIs(), returnOK(), getResponse(...) etc.;
Common to both CTG and SBYND CICS Listener, such as execute(),
execute(....), and sendRequest(...);
| Field Summary | |
|---|---|
protected SBYNDCicsProxy |
_SBYNDCicsProxy
|
protected SBYNDCicsProxyConfig |
_SBYNDCicsProxyConfig
|
protected boolean |
eciExtend
|
protected boolean |
eciSync
|
protected com.stc.connector.logging.Logger |
logger
|
protected boolean |
manualConnect
|
protected com.stc.connector.framework.util.ConfigurationHelper |
mConfiguration
|
protected java.lang.String |
password
|
protected int |
port
|
protected java.lang.String |
program
|
protected java.lang.String |
server
|
protected java.lang.String |
sslClass
|
protected java.lang.String |
sslPassword
|
protected int |
traceDumpOffset
|
protected java.lang.String |
traceFilename
|
protected int |
traceLevel
|
protected boolean |
traceTiming
|
protected int |
traceTruncationSize
|
protected java.lang.String |
url
|
protected java.lang.String |
userId
|
| Constructor Summary | |
|---|---|
CicsClientImpl(com.stc.connector.framework.util.ConfigurationHelper aConfiguration)
CicsClient constructor |
|
| Method Summary | |
|---|---|
PackedDecimal |
commAreaToPackedDecimal(int offset,
int intSize,
int decSize)
Build a packed decimal from the payload in CommArea section specified by (offset, intSize, decSize) |
java.lang.String |
commAreaZonedToString(int offset,
int length)
Convert the zoned decimal (COBOL PIC S9) byte array CommArea field to a String using current value of CicsClient Encoding as encoding; |
java.lang.String |
commAreaZonedToString(int offset,
int length,
java.lang.String enc)
Convert the zoned decimal (COBOL PIC S9) byte array CommArea field to a String; |
void |
connect()
Establish a connection to the CICS server and subsequently, the collaboration can flow request (CICS program calls) to the server across the connection; |
protected void |
copyParams()
|
void |
disconnect()
Disconnect the connection established through connect(); |
void |
execute()
For SBYND CICS Listner: |
void |
execute(boolean eciSynCall,
java.lang.String cicsServerName,
java.lang.String cicsUserId,
java.lang.String cicsPassword,
java.lang.String cicsProgram,
java.lang.String cicsTransId,
byte[] byteArray,
int length,
boolean eciExtendMode,
int eciLUWToken,
int msgQualifier,
java.lang.Object asyncCallHandler)
For compatibility if eciTPN is not in the parameter list, set it to false |
void |
execute(boolean eciSynCall,
java.lang.String cicsServerName,
java.lang.String cicsUserId,
java.lang.String cicsPassword,
java.lang.String cicsProgram,
java.lang.String cicsTransId,
byte[] byteArray,
int length,
boolean eciExtendMode,
int eciLUWToken,
int msgQualifier,
java.lang.Object asyncCallHandler,
boolean eciTPN)
For SBYND CICS Listner: invoke the remote CICS program through the following steps (defined by a propritary protocol) (1) prepare a APC record (Application Control Record) with request code as SBYND_LISTENER_REQCODE_REQ_SYNC
or SBYND_LISTENER_REQCODE_REQ_ASYNC depend on
parameter
eciSynCall
with byteArray as the payload;
the prepare APC record is in the outbound buffer in SBYNDCicsProxy
(2) send the request to SBYND CICS Listener;
(3) get response from SBYND CICS Listener;
(4) further get returned data from the program if it is a sync
call
(5) ACK or NACK accordingly
For CTG:
prepare an ECIRequest object with the data given via the
parameters, call method flow() to send the request and
get result (sync) or proceed (async); |
protected java.lang.String |
getAsyncResponseTopic()
Getter for CicsClient node AsyncResponseTopic;
Return the current value in CicsClient node
AsyncResponseTopic, the topic is used
by async call handler to publish the program completion
information such as CommArea returned from
the called program, error code and error text if there
is any;
initial value is from the configuration parameter
Async Response Topic in section "CICS Client"; |
protected int |
getAsyncRspNotifPort()
Getter for CicsClient AsyncRspNotifPort;
Return the current value in CicsClient
AsyncRspNotifPort, the port is used
by async call handler to publish the program completion
information such as CommArea returned from
the called program, error code and error text if there
is any;
initial value is from the configuration parameter
Async Call JMS Server Port in section "CICS
Client"; |
protected java.lang.String |
getAsyncRspNotifServer()
Getter for CicsClient node AsyncRspNotifServer;
Return the current value in CicsClient node
AsyncRspNotifServer, the host name is used
by async call handler to publish the program completion
information such as CommArea returned from
the called program, error code and error text if there
is any;
initial value is from the configuration parameter
Async Call JMS Server Host in section "CICS
Client"; |
byte[] |
getCommArea()
Getter for CicsClient CommArea;
Return the CommArea
- i.e. |
int |
getCommAreaLength()
Getter for CicsClient CommAreaLength;
Return the CommAreaLength
- i.e. |
java.lang.String |
getCommAreaString()
Construct a commarea String by converting the commarea array of bytes using the platform's default character encoding. |
java.lang.String |
getCommAreaString(int offset,
int length)
Construct a commarea String by converting the commarea array of bytes with offset and length using the platform's default character encoding. |
java.lang.String |
getCommAreaString(int offset,
int length,
java.lang.String enc)
Construct a commarea String by converting the commarea array of bytes with offset and length using the platform's default character encoding. |
java.lang.String |
getCommAreaString(java.lang.String enc)
Construct a commarea String by converting the commarea array of bytes using the character encoding specified as an argument. |
protected java.lang.Object |
getEciCallbackable()
Setter for CicsClient EciCallbackable; |
ECIErrorCodes |
getECIERRORS()
CTG specific; Return ECIErrorCodes object;
this getter is for CicsClient ECIERRORS; |
boolean |
getEciExtend()
Getter for CicsClient EciExtend;
Return the EciExtend flag (refer to CTG doc for detailed
description of the flag)
- i.e. |
int |
getEciLuwToken()
Getter for CicsClient EciLuwToken;
Return the ECI Luw token;
- i.e. |
boolean |
getEciSync()
Getter for CicsClient EciSync;
Return the ECI call type
- i.e. |
boolean |
getEciTPN()
Getter for CicsClient eciTPN;
Return the ECI Transid type
CTG Only; |
java.lang.String |
getEncodedCommAreaString()
Construct a commarea String by converting the commarea array of bytes using the character encoding specified earlier for the CicsClientException. |
java.lang.String |
getEncodedCommAreaString(int offset,
int length)
Construct a commarea String by converting the commarea array of bytes with offset and length using the platform's default character encoding. |
java.lang.String |
getEncoding()
Getter for CicsClient Encoding;
Return the encoding which can be used
to translate the data to and from the CICS
program - i.e. |
protected static java.lang.String |
getHexString(byte[] byteArray)
|
java.lang.String |
getHost()
Getter for CicsClient Host;
Return Host pointing to the Listener to connect to
- i.e. |
int |
getListenerTimeout()
SBYND CICS Listener specific; Getter for Listener time out - CicsClient ListenerTimeout
initial value is from configuration parameter
Listener Timeout
in section "SeeBeyond CICS Listener"; |
int |
getMessageQualifier()
Getter for CicsClient MessageQualifier;
Return the MessageQualifier for ECI call
- i.e. |
java.lang.String |
getPaddingCharacter()
SBYND CICS Listener specific; Getter for padding character - CicsClient PaddingCharacter
initial value is from configuration parameter
COMMAREA Padding Character
in section "SeeBeyond CICS Listener"; |
java.lang.String |
getPassword()
Getter for CicsClient Password;
Return the CICS user password
- i.e. |
int |
getPollingRate()
SBYND CICS Listener specific; Getter for Listener Polling Rate - CicsClient PollingRate
initial value is from configuration parameter
Polling Rate
in section "SeeBeyond CICS Listener"; |
int |
getPort()
Getter for CicsClient Port;
Return the port of the host where CTG
gateway is to be connected to - i.e. |
java.lang.String |
getProgram()
Getter for CicsClient Program;
Return the CICS program name to be invoked;
- i.e. |
java.lang.String |
getProgramName()
SBYND CICS Listener specific; Return the program name of the response assuming a response is in the current inbound buffer; should be called immediately after getResponse(); |
int |
getRequestCode()
SBYND CICS Listener specific; Return the request code of the response assuming a response is in the current inbound buffer; should be called immediately after getResponse(); |
SBYNDAppControlRecordRequestCodes |
getREQUESTCODES()
SBYND CICS Listener specific; Return SBYNDAppControlRecordRequestCodes object;
this getter is for CicsClient REQUESTCODES; |
java.lang.String |
getRequestDesc()
SBYND CICS Listener specific; Return description for the request code assuming a response is in the current inbound buffer; should be called immediately after getResponse(); |
boolean |
getResponse()
SBYND CICS Listener specific; Read from the SBYND CICS Listener in blocking mode until timed out or get a response; |
boolean |
getResponse(int timeout)
SBYND CICS Listener specific; Read from the SBYND CICS Listener in blocking mode until timed out or get a response; |
int |
getReturnCode()
SBYND CICS Listener specific; Return the error code of the current response assuming a response is in the current inbound buffer; should be called immediately after getResponse(); |
SBYNDAppControlRecordReturnCodes |
getRETURNCODES()
SBYND CICS Listener specific; Return SBYNDAppControlRecordReturnCodes object;
this getter is for CicsClient RETURNCODES; |
java.lang.String |
getReturnMessage()
SBYND CICS Listener specific; Return the error text of the current response assuming a response is in the current inbound buffer; should be called immediately after getResponse(); |
SBYNDCicsProxyConfig |
getSBYNDCicsProxyConfig()
SBYND CICS Listener specific; Return the SBYND CICS Listener specific configuration parameters; |
java.lang.String |
getSBYNDListenerTransID()
SBYND CICS Listener specific; Getter for SBYND CICS Listener TransID - CicsClient SBYNDListenerTransID
initial value is from configuration parameter
SeeBeyond CICS Listener TransId
in section "SeeBeyond CICS Listener"; |
java.lang.String |
getServer()
Getter for CicsClient Server;
Return CICS server name where the request is sent to
- i.e. |
java.lang.String[] |
getServerList(int maxNumSystems)
Obtain a list of CICS servers defined: name-description pairs With SBYND Listener as the transport, only one server is returned, i.e. |
java.lang.String |
getSslClass()
Getter for CicsClient SslClass;
Return the SSL class for SSL authentication
- i.e. |
java.lang.String |
getSslPassword()
Getter for CicsClient SslPassword;
Return the PASSWORD for the encrypted KeyRing class;
- i.e. |
java.lang.String |
getStartDelay()
SBYND CICS Listener specific; Getter for Startup delay - CicsClient StartDelay
initial value is from configuration parameter
Start Delay
in section "SeeBeyond CICS Listener"; |
java.lang.String |
getStartType()
SBYND CICS Listener specific; Getter for Startup type - CicsClient StartType
initial value is from configuration parameter
Start Type
in section "SeeBeyond CICS Listener"; |
int |
getTPTimeout()
SBYND CICS Listener specific; Getter for CICS program time out - CicsClient TPTimeout
initial value is from configuration parameter
TP Timeout
in section "SeeBeyond CICS Listener"; |
int |
getTraceDumpOffset()
Getter for CicsClient TraceDumpOffset;
Return the trace dump offset for CTG client log;
- i.e. |
java.lang.String |
getTraceFilename()
Getter for CicsClient TraceFilename;
Return the trace file name for CTG client log;
- i.e. |
int |
getTraceLevel()
Getter for CicsClient TraceLevel;
Return the trace level for CTG client log;
- i.e. |
boolean |
getTraceTiming()
Getter for CicsClient TraceTiming;
Return the trace timing (time stamp) in CTG client log;
- i.e. |
int |
getTraceTruncationSize()
Getter for CicsClient TraceTruncationSize;
Return the trace truncation size for CTG client log;
- i.e. |
java.lang.String |
getTransId()
Getter for CicsClient TransId;
Return the CICS transId to be invoked;
- i.e. |
java.lang.String |
getTransport()
Gets the Transport type (Listener or Gateway) |
int |
getTransportTimeout()
SBYND CICS Listener specific; Getter for TransportTimeout - CicsClient TransportTimeout
initial value is from configuration parameter
Transport Timeout
in section "SeeBeyond CICS Listener"; |
java.lang.String |
getUrl()
Getter for CicsClient Url;
Return URL pointing to the remote or local CICS transaction
gateway to connect to - i.e. |
java.lang.String |
getUserId()
Getter for CicsClient UserId;
Return the CICS user id
- i.e. |
void |
handleTrace()
|
void |
initialize()
Initializes the OTD. |
protected void |
initProxy(boolean useListener)
|
boolean |
isConnected()
Check if the connection is good; |
java.lang.String |
packedDecimalToString(PackedDecimal pd)
Get the string from a packed decimal object; |
void |
prepareAPCRecord(java.lang.String progname,
int appltimeout,
int requestcode,
int errorcode,
java.lang.String errortext)
SBYND CICS Listener specific; Prepare an APC Record in outbound buffer of SBYNDCicsProxy using the parameters and this can be send out by invoking sendRequest() subsequently; |
boolean |
reset()
Resets the data content of an CicsClientException. |
boolean |
returnCodeIs(int code)
SBYND CICS Listener specific; check if the error code in the APC record is the same as code; |
boolean |
returnOK()
SBYND CICS Listener specific; check if the error code in the APC record is SBYND_LISTENER_RC_OK; |
void |
sendRequest(java.lang.Object requestObj)
For SBYND CICS Listner: 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; |
protected void |
setAsyncResponseTopic(java.lang.String topic)
Setter for CicsClient node AsyncResponseTopic;
once is set, the value will be used by the
subsequent async call such as execute() until it
is set again to another value. |
protected void |
setAsyncRspNotifPort(int port)
Setter for CicsClient AsyncRspNotifPort;
once is set, the value will be used by the
subsequent async call such as execute() for publishing
async call completion event until it
is set again to another value. |
protected void |
setAsyncRspNotifServer(java.lang.String server)
Setter for CicsClient AsyncRspNotifServer;
once is set, the value will be used by the
subsequent async call such as execute() for publishing
to the server with topic as indicated by the
value in AsyncResponseTopic until it
is set again to another value. |
void |
setCommArea(byte[] byteArray)
Setter for CicsClient CommArea;
set the payload into CommArea usually used
by the subsequent program invoking; |
void |
setCommAreaLength(int i)
Setter for CicsClient CommAreaLength;
length of the CommArea;
initial value is from the configuration parameter:
COMMAREA Length; |
protected void |
setEciCallbackable(java.lang.Object handler)
Setter for CicsClient EciCallbackable; |
void |
setEciExtend(boolean b)
Setter for CicsClient EciExtend;
Have effect for CTG only;
Ignored by SBYND Listener - not implemented; |
void |
setEciLuwToken(int i)
Setter for CicsClient EciLuwToken;
An integer identifying a LUW;
initial value is from the configuration parameter:
ECI LUW token in section "CICS Client";
CTG specific; |
void |
setEciSync(boolean b)
Setter for CicsClient EciSync;
indicate if the call will be sync or async; |
void |
setEciTPN(boolean b)
Setter for ETD node eciTPN;
indicate if the transid will be interpreted as ECI_TPN; |
void |
setEncoding(java.lang.String s)
Setter for CicsClient Encoding; |
void |
setHost(java.lang.String s)
Setter for CicsClient Host;
Set Host pointing to the Listener to connect to;
Listener specific; |
void |
setListenerTimeout(int timeout)
SBYND CICS Listener specific; Setter for Listener Timeout - CicsClient ListenerTimeout |
void |
setMessageQualifier(int i)
Setter for CicsClient MessageQualifier;
Have effect for CTG only;
Ignored by SBYND Listener - not implemented; |
void |
setPaddingCharacter(java.lang.String padcharhex)
SBYND CICS Listener specific; Setter for padding character - CicsClient PaddingCharacter |
void |
setPassword(java.lang.String s)
Setter for CicsClient Password;
the CICS password needed to authenticate the user
when calling the CICS program; |
void |
setPollingRate(int rate)
SBYND CICS Listener specific; Setter for Polling Rate - CicsClient PollingRate |
void |
setPort(int i)
Setter for CicsClient Port;
Set port of the host where the CTG is running;
CTG specific; |
void |
setProgram(java.lang.String s)
Setter for CicsClient Program;
the CICS program to be called; |
void |
setSBYNDListenerTransID(java.lang.String transid)
SBYND CICS Listener specific; Setter for SBYND CICS Listener TransID - CicsClient SBYNDListenerTransID |
void |
setServer(java.lang.String s)
Setter for CicsClient Server; |
void |
setSslClass(java.lang.String s)
Setter for CicsClient SslClass;
CTG specific; |
void |
setSslPassword(java.lang.String s)
Setter for CicsClient SslPassword;
the PASSWORD for the encrypted KeyRing class;
CTG specific; |
void |
setStartDelay(java.lang.String startdelay)
SBYND CICS Listener specific; Setter for Startup delay - CicsClient StartDelay |
void |
setStartType(java.lang.String starttype)
SBYND CICS Listener specific; Setter for Startup delay - CicsClient StartType |
void |
setTPTimeout(int timeout)
SBYND CICS Listener specific; Setter for TP Timeout - CicsClient TPTimeout |
void |
setTraceDumpOffset(int i)
Setter for CicsClient TraceDumpOffset; |
void |
setTraceFilename(java.lang.String s)
Setter for CicsClient TraceFilename; |
void |
setTraceLevel(int i)
Setter for CicsClient TraceLevel; |
void |
setTraceTiming(boolean b)
Setter for CicsClient TraceTiming;
CTG only; |
void |
setTraceTruncationSize(int i)
Setter for CicsClient TraceTruncationSize; |
void |
setTransId(java.lang.String s)
Setter for CicsClient Program;
the CICS program's trans ID to be called; |
void |
setTransportTimeout(int timeout)
SBYND CICS Listener specific; Setter for Transport Timeout - CicsClient TransportTimeout |
void |
setUrl(java.lang.String s)
Setter for CicsClient Url;
Set URL pointing to the remote or local CICS transaction
gateway to connect to;
CTG specific; |
void |
setUserId(java.lang.String s)
Setter for CicsClient UserId; |
void |
terminate()
Terminates the CicsClientException. |
PackedDecimal |
toPackedDecimal(java.lang.String number,
int intSize,
int decSize)
Build a packed decimal from a string number Convert the in String +-99999.99 in an packed decimal IBM data Flow -> Each digit is a 0..9 Numerical value last digit is the sign digit : A|C|E|F => + ; B|D => - ; the decimal point is virtual its position is defined in the second byte of dec_length |
byte[] |
toZoned(java.lang.String number)
Convert a number in the form of a String to zoned decimal (COBOL PIC S9) byte array using the current value of CicsClient Encoding as
the encoding; |
byte[] |
toZoned(java.lang.String number,
java.lang.String enc)
Convert a number in the form of a String to zoned decimal (COBOL PIC S9) byte array using the encoding specified by the parameter enc; |
java.lang.String |
zonedToString(byte[] zoned)
Convert the zoned decimal (COBOL PIC S9) byte array specified by zoned to a String using current value
of CicsClient Encoding as encoding; |
java.lang.String |
zonedToString(byte[] zoned,
java.lang.String enc)
Convert the zoned decimal (COBOL PIC S9) byte array specified by zoned to a String using
the specified encoding enc; |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SBYNDCicsProxy _SBYNDCicsProxy
protected SBYNDCicsProxyConfig _SBYNDCicsProxyConfig
protected java.lang.String server
protected java.lang.String url
protected int port
protected java.lang.String sslClass
protected java.lang.String sslPassword
protected java.lang.String userId
protected java.lang.String password
protected boolean eciSync
protected java.lang.String program
protected boolean eciExtend
protected int traceLevel
protected java.lang.String traceFilename
protected int traceTruncationSize
protected int traceDumpOffset
protected boolean traceTiming
protected com.stc.connector.framework.util.ConfigurationHelper mConfiguration
protected com.stc.connector.logging.Logger logger
protected boolean manualConnect
| Constructor Detail |
|---|
public CicsClientImpl(com.stc.connector.framework.util.ConfigurationHelper aConfiguration)
throws CicsClientException
config - Properties bundle containing CICS specific connection information
CicsClientException - upon error| Method Detail |
|---|
public void initialize()
throws CicsClientException
CicsClientException - upon error.public java.lang.String getTransport()
getTransport in interface CicsClientprotected java.lang.String getAsyncResponseTopic()
AsyncResponseTopic;
Return the current value in CicsClient node
AsyncResponseTopic, the topic is used
by async call handler to publish the program completion
information such as CommArea returned from
the called program, error code and error text if there
is any;
initial value is from the configuration parameter
Async Response Topic in section "CICS Client";
An empty string or null means no intension to publish the completion event to any topic; CTG & SBYND Listener;
protected void setAsyncResponseTopic(java.lang.String topic)
AsyncResponseTopic;
once is set, the value will be used by the
subsequent async call such as execute() until it
is set again to another value.
CTG & SBYND Listener;
topic - - the topic;protected java.lang.String getAsyncRspNotifServer()
AsyncRspNotifServer;
Return the current value in CicsClient node
AsyncRspNotifServer, the host name is used
by async call handler to publish the program completion
information such as CommArea returned from
the called program, error code and error text if there
is any;
initial value is from the configuration parameter
Async Call JMS Server Host in section "CICS
Client";
CTG & SBYND Listener;
protected void setAsyncRspNotifServer(java.lang.String server)
AsyncRspNotifServer;
once is set, the value will be used by the
subsequent async call such as execute() for publishing
to the server with topic as indicated by the
value in AsyncResponseTopic until it
is set again to another value.
CTG & SBYND Listener;
server - - the host name for the server;protected int getAsyncRspNotifPort()
AsyncRspNotifPort;
Return the current value in CicsClient
AsyncRspNotifPort, the port is used
by async call handler to publish the program completion
information such as CommArea returned from
the called program, error code and error text if there
is any;
initial value is from the configuration parameter
Async Call JMS Server Port in section "CICS
Client";
CTG & SBYND Listener;
protected void setAsyncRspNotifPort(int port)
AsyncRspNotifPort;
once is set, the value will be used by the
subsequent async call such as execute() for publishing
async call completion event until it
is set again to another value.
CTG & SBYND Listener;
port - - the port number for the server;public java.lang.String getUrl()
Url;
Return URL pointing to the remote or local CICS transaction
gateway to connect to - i.e. the current value in CicsClient
Url;
initial value is from the configuration parameter
URL in section "CICS Gateway";
CTG specific;
getUrl in interface CicsClientpublic void setUrl(java.lang.String s)
Url;
Set URL pointing to the remote or local CICS transaction
gateway to connect to;
CTG specific;
setUrl in interface CicsClients - - the url;public java.lang.String getHost()
Host;
Return Host pointing to the Listener to connect to
- i.e. the current value in CicsClient
Host;
initial value is from the configuration parameter
URL in section "SeeBeyond CICS Listener";
Listener specific;
getHost in interface CicsClientpublic void setHost(java.lang.String s)
Host;
Set Host pointing to the Listener to connect to;
Listener specific;
setHost in interface CicsClients - - the Host;public int getPort()
Port;
Return the port of the host where CTG
gateway is to be connected to - i.e. the current value in CicsClientException
node Port;
initial value is from the configuration parameter
Port in section "CICS Gateway";
CTG specific;
getPort in interface CicsClientpublic void setPort(int i)
Port;
Set port of the host where the CTG is running;
CTG specific;
setPort in interface CicsClienti - - the port;public java.lang.String getSslClass()
SslClass;
Return the SSL class for SSL authentication
- i.e. the current value in CicsClientException
node SslClass;
initial value is from the configuration parameter
SSL KeyRing Class in section "CICS Gateway";
CTG specific;
getSslClass in interface CicsClientpublic void setSslClass(java.lang.String s)
SslClass;
CTG specific;
setSslClass in interface CicsClients - - the SSL class full name;public java.lang.String getSslPassword()
SslPassword;
Return the PASSWORD for the encrypted KeyRing class;
- i.e. the current value in CicsClientException
node SslPassword;
initial value is from the configuration parameter
SSL KeyRing Password in section "CICS Gateway";
CTG specific;
getSslPassword in interface CicsClientpublic void setSslPassword(java.lang.String s)
SslPassword;
the PASSWORD for the encrypted KeyRing class;
CTG specific;
setSslPassword in interface CicsClients - - the pasword;public boolean getEciSync()
EciSync;
Return the ECI call type
- i.e. the current value in CicsClientException
node EciSync;
initial value is from the configuration parameter
ECI call type in section "CICS Client";
CTG & SBYND Listener;
getEciSync in interface CicsClienttrue - the call is a synchronous one,
false otherwise;public void setEciSync(boolean b)
EciSync;
indicate if the call will be sync or async;
setEciSync in interface CicsClients - - the EciSync flag true
the call will be a sync call false
otherwise;public java.lang.String getUserId()
UserId;
Return the CICS user id
- i.e. the current value in CicsClientException
node UserId;
initial value is from the configuration parameter
CICS UserId in section "CICS Client";
CTG & SBYND Listener;
getUserId in interface CicsClientpublic void setUserId(java.lang.String s)
UserId;
setUserId in interface CicsClients - - user id;public java.lang.String getPassword()
Password;
Return the CICS user password
- i.e. the current value in CicsClientException
node Password;
initial value is from the configuration parameter
CICS Password in section "CICS Client";
CTG & SBYND Listener;
getPassword in interface CicsClientpublic void setPassword(java.lang.String s)
Password;
the CICS password needed to authenticate the user
when calling the CICS program;
setPassword in interface CicsClients - - the password;public java.lang.String getProgram()
Program;
Return the CICS program name to be invoked;
- i.e. the current value in CicsClientException
node Program;
initial value is from the configuration parameter
CICS Program in section "CICS Client";
CTG & SBYND Listener;
getProgram in interface CicsClientpublic void setProgram(java.lang.String s)
Program;
the CICS program to be called;
setProgram in interface CicsClients - - the program name;public java.lang.String getTransId()
TransId;
Return the CICS transId to be invoked;
- i.e. the current value in CicsClientException
node TransId;
initial value is from the configuration parameter
CICS TransId in section "CICS Client";
CTG & SBYND Listener;
getTransId in interface CicsClientpublic void setTransId(java.lang.String s)
Program;
the CICS program's trans ID to be called;
setTransId in interface CicsClients - - the trans ID of the CICS program;public boolean getEciTPN()
eciTPN;
Return the ECI Transid type
CTG Only;
getEciTPN in interface CicsClienttrue - the Transid field is an eci_tpn transid,
false otherwise;public void setEciTPN(boolean b)
eciTPN;
indicate if the transid will be interpreted as ECI_TPN;
setEciTPN in interface CicsClients - - the eciTPN flag true
the TransID will be interpreted as ECI_TPN false
otherwise;public byte[] getCommArea()
CommArea;
Return the CommArea
- i.e. the current value in CicsClientException
node CommArea;
CTG & SBYND Listener;
getCommArea in interface CicsClientpublic void setCommArea(byte[] byteArray)
CommArea;
set the payload into CommArea usually used
by the subsequent program invoking;
setCommArea in interface CicsClientbyteArray - - the payload used by the program
to be invoked;public int getCommAreaLength()
CommAreaLength;
Return the CommAreaLength
- i.e. the current value in CicsClientException
node CommAreaLength;
initial value is from the configuration parameter
COMMAREA Length in section "CICS Client";
CTG & SBYND Listener;
getCommAreaLength in interface CicsClientpublic void setCommAreaLength(int i)
CommAreaLength;
length of the CommArea;
initial value is from the configuration parameter:
COMMAREA Length;
setCommAreaLength in interface CicsClienti - - the length;public boolean getEciExtend()
EciExtend;
Return the EciExtend flag (refer to CTG doc for detailed
description of the flag)
- i.e. the current value in CicsClientException
node EciExtend;
initial value is from the configuration parameter
ECI extend mode in section "CICS Client";
Have effect for CTG only; Ignored by SBYND Listener - not implemented;
getEciExtend in interface CicsClienttrue the current call is and extension
of a LUW, false otherwise;public void setEciExtend(boolean b)
EciExtend;
Have effect for CTG only;
Ignored by SBYND Listener - not implemented;
setEciExtend in interface CicsClienttrue - the current call is and extension
of a LUW, false otherwise;public int getEciLuwToken()
EciLuwToken;
Return the ECI Luw token;
- i.e. the current value in CicsClientException
node EciLuwToken;
initial value is from the configuration parameter
ECI LUW token in section "CICS Client";
Have effect for CTG only ignored by SBYND Listener - not implemented;
getEciLuwToken in interface CicsClientpublic void setEciLuwToken(int i)
EciLuwToken;
An integer identifying a LUW;
initial value is from the configuration parameter:
ECI LUW token in section "CICS Client";
CTG specific;
setEciLuwToken in interface CicsClienti - - the unit;public int getMessageQualifier()
MessageQualifier;
Return the MessageQualifier for ECI call
- i.e. the current value in CicsClientException
node MessageQualifier;
initial value is from the configuration parameter
Message qualifier in section "CICS Client";
Have effect for CTG only ignored by SBYND Listener - not implemented;
getMessageQualifier in interface CicsClientpublic void setMessageQualifier(int i)
MessageQualifier;
Have effect for CTG only;
Ignored by SBYND Listener - not implemented;
setMessageQualifier in interface CicsClienti - the message qualifier;public java.lang.String getEncoding()
Encoding;
Return the encoding which can be used
to translate the data to and from the CICS
program - i.e. the current value in CicsClientException
node Encoding;
initial value is from the configuration parameter
Encoding in section "CICS Client";
CTG & SBYND Listener;
getEncoding in interface CicsClientpublic void setEncoding(java.lang.String s)
Encoding;
setEncoding in interface CicsClients - the encoding used for payload
translation;public int getTraceLevel()
TraceLevel;
Return the trace level for CTG client log;
- i.e. the current value in CicsClientException
node TraceLevel;
initial value is from the configuration parameter
Level in section "Tracing";
CTG only;
getTraceLevel in interface CicsClientpublic void setTraceLevel(int i)
TraceLevel;
setTraceLevel in interface CicsClienti - the CTG client tracing level;public java.lang.String getTraceFilename()
TraceFilename;
Return the trace file name for CTG client log;
- i.e. the current value in CicsClientException
node TraceFilename;
initial value is from the configuration parameter
Filename in section "Tracing";
CTG only;
getTraceFilename in interface CicsClientpublic void setTraceFilename(java.lang.String s)
TraceFilename;
setTraceFilename in interface CicsClients - the CTG client tracing file name;public int getTraceTruncationSize()
TraceTruncationSize;
Return the trace truncation size for CTG client log;
- i.e. the current value in CicsClientException
node TraceTruncationSize;
initial value is from the configuration parameter
Truncation Size in section "Tracing";
CTG only;
getTraceTruncationSize in interface CicsClientpublic void setTraceTruncationSize(int i)
TraceTruncationSize;
setTraceTruncationSize in interface CicsClienti - the CTG client tracing truncation size;public int getTraceDumpOffset()
TraceDumpOffset;
Return the trace dump offset for CTG client log;
- i.e. the current value in CicsClientException
node TraceDumpOffset;
initial value is from the configuration parameter
Dump Offset in section "Tracing";
CTG only;
getTraceDumpOffset in interface CicsClientpublic void setTraceDumpOffset(int i)
TraceDumpOffset;
setTraceDumpOffset in interface CicsClienti - the CTG client tracing dump offset;public boolean getTraceTiming()
TraceTiming;
Return the trace timing (time stamp) in CTG client log;
- i.e. the current value in CicsClientException
node TraceTiming;
initial value is from the configuration parameter
Timing in section "Tracing";
CTG only;
getTraceTiming in interface CicsClienttrueinclude time stamp in CTG client tracing
false otherwise;public void setTraceTiming(boolean b)
TraceTiming;
CTG only;
setTraceTiming in interface CicsClientb - true include time stamp
in CTG client tracing, false otherwise;public java.lang.String getServer()
Server;
Return CICS server name where the request is sent to
- i.e. the current value in CicsClientException
node Server;
With CTG, the value can be set by the collaboration or
if getServerList() is called, the side effect is to set the
first server in the server list obtained to the
CicsClient Server;
With SBYND Listener, the value is not used;
instead a configuration parameter Host
in configuration section "SeeBeyond CICS Listener" is used;
getServer in interface CicsClientpublic void setServer(java.lang.String s)
Server;
setServer in interface CicsClients - CICS Server name;protected java.lang.Object getEciCallbackable()
EciCallbackable;
s - CICS Server name;
void;
===> Made private to disable asyncprotected void setEciCallbackable(java.lang.Object handler)
EciCallbackable;
handler - Async call handler -
the valid instance should be either
com.stc.eways.cics.CTGReplyHandler
or com.stc.eways.cics.SBYNDListenerReplyHandler;
protected void initProxy(boolean useListener)
throws CicsClientException
CicsClientException
public void handleTrace()
throws CicsClientException
CicsClientException
public void terminate()
throws CicsClientException
CicsClientException - upon an external connection problempublic boolean reset()
reset in interface CicsClientfalse if the CicsClientException doesn't have a meaningful implementation of
reset(); so do a new of the CicsClientException instead.
Otherwise, return true if the reset will clear the data content
of the CicsClientException.
public void connect()
throws CicsClientException
The underlying transport used can be CTG or SBYND Listener but it is transparent to the collaboration as far as the connect() is concerned;
connect in interface CicsClientCicsClientException - upon an external connection problem
public void disconnect()
throws CicsClientException
The underlying transport used can be CTG or SBYND Listener but it is transparent to the collaboration as far as the disconnect() is concerned;
disconnect in interface CicsClientCicsClientException - upon an external connection problem
public boolean isConnected()
throws CicsClientException
isConnected in interface CicsClienttrue - is active, false otherwise;
CicsClientException - upon error.
public java.lang.String[] getServerList(int maxNumSystems)
throws CicsClientException
getServerList in interface CicsClientCicsClientException - upon an external connection problemprotected static java.lang.String getHexString(byte[] byteArray)
public void execute()
throws CicsClientException,
SBYNDCicsProxyTimeoutException
use SBYND CICS Listener host as the server name and delegate to execute(eciSync, server, userId, password, program, transId,commArea, commAreaLength, eciExtend, eciLuwToken, messageQualifier, asyncCallHandler) with irrelevant parameters set to 0 or null. only the following parameters are still used by SBYND CICS Listener: (1) eciSync (2) userId (3) password (4) program (5) transId (6) commArea
For CTG:
delegate to execute(eciSync, server, userId, password, program, transId,commArea, commAreaLength, eciExtend, eciLuwToken, messageQualifier, asyncCallHandler)
execute in interface CicsClientCicsClientException - upon error
SBYNDCicsProxyTimeoutException
public void execute(boolean eciSynCall,
java.lang.String cicsServerName,
java.lang.String cicsUserId,
java.lang.String cicsPassword,
java.lang.String cicsProgram,
java.lang.String cicsTransId,
byte[] byteArray,
int length,
boolean eciExtendMode,
int eciLUWToken,
int msgQualifier,
java.lang.Object asyncCallHandler)
throws CicsClientException,
SBYNDCicsProxyTimeoutException
execute in interface CicsClientCicsClientException
SBYNDCicsProxyTimeoutException
public void execute(boolean eciSynCall,
java.lang.String cicsServerName,
java.lang.String cicsUserId,
java.lang.String cicsPassword,
java.lang.String cicsProgram,
java.lang.String cicsTransId,
byte[] byteArray,
int length,
boolean eciExtendMode,
int eciLUWToken,
int msgQualifier,
java.lang.Object asyncCallHandler,
boolean eciTPN)
throws CicsClientException,
SBYNDCicsProxyTimeoutException
SBYND_LISTENER_REQCODE_REQ_SYNC
or SBYND_LISTENER_REQCODE_REQ_ASYNC depend on
parameter
eciSynCall
with byteArray as the payload;
the prepare APC record is in the outbound buffer in SBYNDCicsProxy
(2) send the request to SBYND CICS Listener;
(3) get response from SBYND CICS Listener;
(4) further get returned data from the program if it is a sync
call
(5) ACK or NACK accordingly
For CTG:
prepare an ECIRequest object with the data given via the
parameters, call method flow() to send the request and
get result (sync) or proceed (async);
execute in interface CicsClienteciSynCall - - true invoke the program synchronously,
false invoke the program asynchronously;cicsServerName - - CICS server name - CTG only;cicsUserId - - CICS user id;cicsPassword - - CICS password;cicsProgram - - CICS program;cicsTransId - - CICS transaction id;byteArray - - payload area (INOUT & OUTPUT)length - - length of the payload - CTG only;eciExtendMode - - ECI extend mode - CTG only;eciLUWToken - - ECI LUW token - CTG only;msgQualifier - - CTG only;asyncCallHandler - - Handler for async call reply;
CicsClientException - upon error
SBYNDCicsProxyTimeoutExceptionpublic java.lang.String getCommAreaString()
getCommAreaString in interface CicsClient
public java.lang.String getEncodedCommAreaString()
throws java.io.UnsupportedEncodingException
getEncodedCommAreaString in interface CicsClientEncoding to do the translation;
java.io.UnsupportedEncodingException
public java.lang.String getCommAreaString(java.lang.String enc)
throws java.io.UnsupportedEncodingException
getCommAreaString in interface CicsClientenc - the encoding used when translating the
CommArea byte array into a String;
java.io.UnsupportedEncodingException
public java.lang.String getCommAreaString(int offset,
int length)
getCommAreaString in interface CicsClientoffset - length -
public java.lang.String getEncodedCommAreaString(int offset,
int length)
throws java.io.UnsupportedEncodingException
getEncodedCommAreaString in interface CicsClientoffset - length -
Encoding;
java.io.UnsupportedEncodingException
public java.lang.String getCommAreaString(int offset,
int length,
java.lang.String enc)
throws java.io.UnsupportedEncodingException
getCommAreaString in interface CicsClientoffset - length - enc -
enc;
java.io.UnsupportedEncodingException
public void sendRequest(java.lang.Object requestObj)
throws CicsClientException
For CTG: The sendRequest method flows data contained in the ECIRequest object to the Gateway and determines whether send has been successful by checking the return code. If an error has occurred, an CollabConnException is thrown.
sendRequest in interface CicsClientrequest - - ECIRequest object contains all the data
needed to invoke a CICS program through CTG, for SBYND CICS Listener
this parameter is ignored;
CicsClientException - upon error
public PackedDecimal toPackedDecimal(java.lang.String number,
int intSize,
int decSize)
throws java.lang.NumberFormatException
toPackedDecimal in interface CicsClientNumber - decimal String representation to be converted
java.lang.NumberFormatException
public PackedDecimal commAreaToPackedDecimal(int offset,
int intSize,
int decSize)
commAreaToPackedDecimal in interface CicsClientoffset - intSize - decSize -
public java.lang.String packedDecimalToString(PackedDecimal pd)
packedDecimalToString in interface CicsClientpd -
public java.lang.String commAreaZonedToString(int offset,
int length,
java.lang.String enc)
commAreaZonedToString in interface CicsClientoffset - - start of the zone;length - - length of the zone;enc - - encoding used for conversion;
public java.lang.String commAreaZonedToString(int offset,
int length)
Encoding as encoding;
commAreaZonedToString in interface CicsClientoffset - - start of the zone;length - - length of the zone;
public java.lang.String zonedToString(byte[] zoned)
throws java.lang.NumberFormatException
zoned to a String using current value
of CicsClient Encoding as encoding;
zonedToString in interface CicsClientzoned - - the byte array contains zoned decimal;
java.lang.NumberFormatException
public java.lang.String zonedToString(byte[] zoned,
java.lang.String enc)
throws java.lang.NumberFormatException
zoned to a String using
the specified encoding enc;
zonedToString in interface CicsClientzoned - - the byte array contains zoned decimal;enc - - the encoding used for conversion;
java.lang.NumberFormatExceptionpublic byte[] toZoned(java.lang.String number)
Encoding as
the encoding;
toZoned in interface CicsClientnumber - - the number String;
public byte[] toZoned(java.lang.String number,
java.lang.String enc)
enc;
toZoned in interface CicsClientnumber - - the number String;enc - - the encoding;
public int getReturnCode()
throws CicsClientException
getReturnCode in interface CicsClientCicsClientException
public java.lang.String getReturnMessage()
throws CicsClientException
getReturnMessage in interface CicsClientCicsClientException
public java.lang.String getProgramName()
throws CicsClientException
getProgramName in interface CicsClientCicsClientException
public int getRequestCode()
throws CicsClientException
getRequestCode in interface CicsClientCicsClientException
public java.lang.String getRequestDesc()
throws CicsClientException
getRequestDesc in interface CicsClientCicsClientException
public void prepareAPCRecord(java.lang.String progname,
int appltimeout,
int requestcode,
int errorcode,
java.lang.String errortext)
throws CicsClientException
prepareAPCRecord in interface CicsClientprogname - - 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);
CicsClientException - if error in data;
public boolean returnCodeIs(int code)
throws CicsClientException
code;
returnCodeIs in interface CicsClienttrue error code is the same as code,
otherwise, false;
CicsClientException
public boolean returnOK()
throws CicsClientException
SBYND_LISTENER_RC_OK;
returnOK in interface CicsClienttrue error code is SBYND_LISTENER_RC_OK,
otherwise, false;
CicsClientException
public boolean getResponse()
throws CicsClientException,
SBYNDCicsProxyTimeoutException
getResponse in interface CicsClienttrue if get a good ACR
otherwise, false;
use the SBYND CICS Listener parameter: Transport Timeout
as the timeout;
CicsClientException
SBYNDCicsProxyTimeoutException
public boolean getResponse(int timeout)
throws CicsClientException,
SBYNDCicsProxyTimeoutException
getResponse in interface CicsClienttimeout - - timeout for getting
response;
true if get a good ACR
otherwise, false;
CicsClientException
SBYNDCicsProxyTimeoutException
public ECIErrorCodes getECIERRORS()
throws CicsClientException
ECIErrorCodes object;
this getter is for CicsClient ECIERRORS;
getECIERRORS in interface CicsClientECIErrorCodes;
CicsClientException
public SBYNDAppControlRecordReturnCodes getRETURNCODES()
throws CicsClientException
SBYNDAppControlRecordReturnCodes object;
this getter is for CicsClient RETURNCODES;
getRETURNCODES in interface CicsClientSBYNDAppControlRecordReturnCodes;
CicsClientException
public SBYNDAppControlRecordRequestCodes getREQUESTCODES()
throws CicsClientException
SBYNDAppControlRecordRequestCodes object;
this getter is for CicsClient REQUESTCODES;
getREQUESTCODES in interface CicsClientSBYNDAppControlRecordRequestCodes;
CicsClientExceptionpublic SBYNDCicsProxyConfig getSBYNDCicsProxyConfig()
SBYNDCicsProxyConfig;
public java.lang.String getSBYNDListenerTransID()
throws CicsClientException
SBYNDListenerTransID
initial value is from configuration parameter
SeeBeyond CICS Listener TransId
in section "SeeBeyond CICS Listener";
getSBYNDListenerTransID in interface CicsClientCicsClientException
public void setSBYNDListenerTransID(java.lang.String transid)
throws CicsClientException
SBYNDListenerTransID
setSBYNDListenerTransID in interface CicsClienttransid - - the transaction ID
of the SBYND CICS Listener - STCL;
CicsClientException
public int getTPTimeout()
throws CicsClientException
TPTimeout
initial value is from configuration parameter
TP Timeout
in section "SeeBeyond CICS Listener";
getTPTimeout in interface CicsClientCicsClientException
public void setTPTimeout(int timeout)
throws CicsClientException
TPTimeout
setTPTimeout in interface CicsClienttimeout - - the timeout value in milli-seconds;
usually this is set to the max estimated time
takes the CICS program to finish and come
back to the inoker;
CicsClientException
public int getListenerTimeout()
throws CicsClientException
ListenerTimeout
initial value is from configuration parameter
Listener Timeout
in section "SeeBeyond CICS Listener";
getListenerTimeout in interface CicsClientCicsClientException
public void setListenerTimeout(int timeout)
throws CicsClientException
ListenerTimeout
setListenerTimeout in interface CicsClienttimeout - - the time that
the SBYND listener will wait for program invoking
request from the eway before it close the connection;
CicsClientException
public int getPollingRate()
throws CicsClientException
PollingRate
initial value is from configuration parameter
Polling Rate
in section "SeeBeyond CICS Listener";
getPollingRate in interface CicsClientCicsClientException
public void setPollingRate(int rate)
throws CicsClientException
PollingRate
setPollingRate in interface CicsClientrate - - a 1-255 value used by listener internally;
CicsClientException
public int getTransportTimeout()
throws CicsClientException
TransportTimeout
initial value is from configuration parameter
Transport Timeout
in section "SeeBeyond CICS Listener";
getTransportTimeout in interface CicsClientCicsClientException
public void setTransportTimeout(int timeout)
throws CicsClientException
TransportTimeout
setTransportTimeout in interface CicsClienttimeout - - time in milli-seconds used to timeout a blocking read
on a socket between the eway and the listener;
CicsClientException
public java.lang.String getStartType()
throws CicsClientException
StartType
initial value is from configuration parameter
Start Type
in section "SeeBeyond CICS Listener";
getStartType in interface CicsClientCicsClientException
public void setStartType(java.lang.String starttype)
throws CicsClientException
StartType
setStartType in interface CicsClientstarttype - - the Startup type value
either "IC" or "TD" used by IBM CICS Listener
to decide how the SBYND Listener will be waked up;
CicsClientException
public java.lang.String getStartDelay()
throws CicsClientException
StartDelay
initial value is from configuration parameter
Start Delay
in section "SeeBeyond CICS Listener";
getStartDelay in interface CicsClientCicsClientException
public void setStartDelay(java.lang.String startdelay)
throws CicsClientException
StartDelay
setStartDelay in interface CicsClientstartdelay - - the delay value in
the format of HHMMSS used by IBM CICS Listener to delay the
wake up of SBYND listener, the default value is "000000";
CicsClientException
public java.lang.String getPaddingCharacter()
throws CicsClientException
PaddingCharacter
initial value is from configuration parameter
COMMAREA Padding Character
in section "SeeBeyond CICS Listener";
getPaddingCharacter in interface CicsClientCommAreaLength;
the default is hexdecimal 40 - EBCDIC space;
CicsClientException
public void setPaddingCharacter(java.lang.String padcharhex)
throws CicsClientException
PaddingCharacter
setPaddingCharacter in interface CicsClientpadcharhex - the EBCDIC code for the character used
by the SBYND listener to pad the COMMAREA at the CICS server
when the actual length of the payload in the COMMAREA
is shorter than the length given by CommAreaLength;
the default is hexdecimal 40 - EBCDIC space;
CicsClientExceptionprotected void copyParams()
|
Sun Adapter for CICS API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||