|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.vap.generic.ServerAdapter | +--com.ibm.vap.ctgadapter.CTGAdapter
This server adapter class is used by the VisualAge Pacbase Runtime to communicate with the server using CTG connectors through CICS Transaction Gateway.
The JavaGateway is the object that represents the logic connection between a client program and a CICS Transaction Gateway. You need one instance for each CTG you want to communicate with. Then you will need to instantiate a CTGAdapter class, setup its properties and set it as the current proxy adapter.
Sample code :
// Instantiate the JavaGateway class com.ibm.ctg.client.JavaGateway gateway = new com.ibm.ctg.client.JavaGateway(); gateway.setURL("tcp://9.101.41.177:2006"); try { // Instantiate an Adpater class and setup paramters. com.ibm.vap.ctgadapter.CTGAdapter ctgAdapter = new com.ibm.vap.ctgadapter.CTGAdapter(gateway); ctgAdapter.setCallType(com.ibm.ctg.client.ECIRequest.ECI_SYNC_TPN); ctgAdapter.setCommareaLength(8192); ctgAdapter.setExtendMode(com.ibm.ctg.client.ECIRequest.ECI_NO_EXTEND); ctgAdapter.setLuwToken(0); ctgAdapter.setPassword("USERPWD"); ctgAdapter.setProgram("CLECIN "); ctgAdapter.setServer("CICSSTMV"); ctgAdapter.setTransid("VEC1"); ctgAdapter.setUserid("USERID"); ctgAdapter.setHostCodePage("Cp1147"); // Instantiate a Vap Proxy and set the adapter class com.ibm.vap.generated.proxies.CustomerProxyLv proxy = new com.ibm.vap.generated.proxies.CustomerProxyLv(); proxy.setServerAdapter(ctgAdapter); proxy.selectInstances(); // Disconnect the JavaGateway when it isn't needed anymore gateway.close(); return proxy.rows(); } catch (com.ibm.vap.generic.CommunicationError ce) { return ce.getMessage(); } catch (com.ibm.vap.generic.SystemError se) { return se.getMessage(); }
ServerAdapter
Constructor Summary | |
CTGAdapter()
Default constructor. |
|
CTGAdapter(com.ibm.vap.ctgadapter.JavaGateway gateway)
Full constructor. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
disconnect()
Frees resources used for the communication by this server adapter (connections, buffers, etc). |
int |
getCallType()
Retrieves the callType attribut. |
int |
getCommareaLength()
Retrieves the commarea length property. |
short |
getECITimeOut()
Retrieves the Timeout property. |
int |
getExtendMode()
Retrieves the extended mode property. |
java.lang.String |
getHostCodePage()
Retrieves the host code page property. |
com.ibm.vap.ctgadapter.JavaGateway |
getJavaGateway()
Retrieves the javaGateway instance. |
int |
getLuwToken()
Retrieves the luwToken property. |
int |
getMessageQualifier()
Retrieves the message qualifier property. |
java.lang.String |
getPassword()
Retrieves the password property. |
java.lang.String |
getProgram()
Retrieves the program property. |
java.lang.Object |
getProperty(java.lang.String name)
Returns the communication parameter for the specified String name. |
java.lang.String |
getServer()
Retrieves the server property. |
java.lang.String |
getTransid()
Retrieves the transid property. |
java.lang.String |
getUserid()
Retrieves the userid property. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
com.ibm.vap.generic.Requester |
requireRequester()
Returns an instance of requester associated to this server adapter, and open the javaGateway. |
void |
setCallType(int newValue)
Sets the call type property. |
void |
setCommareaLength(int newValue)
Sets the Commarea length property. |
void |
setECITimeout(short newValue)
Sets the timeout property. |
void |
setExtendMode(int newValue)
Sets the extend mode property. |
void |
setHostCodePage(java.lang.String newValue)
Sets the host code page property. |
void |
setJavaGateway(com.ibm.vap.ctgadapter.JavaGateway newValue)
Sets the javaGateway instance. |
void |
setLuwToken(int newValue)
Sets the luwToken mode property. |
void |
setMessageQualifier(int newValue)
Sets the message qualifier property. |
void |
setPassword(java.lang.String newValue)
Sets the password property. |
void |
setProgram(java.lang.String newValue)
Sets the program property. |
void |
setProperty(java.lang.String name,
java.lang.Object newValue)
Sets a communication parameter of specified name. |
void |
setServer(java.lang.String newValue)
Sets the server property. |
void |
setTransid(java.lang.String newValue)
Sets the transid property. |
void |
setUserid(java.lang.String newValue)
Sets the user property. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CTGAdapter()
public CTGAdapter(com.ibm.vap.ctgadapter.JavaGateway gateway)
gateway
- com.ibm.ctg.client.JavaGatewayMethod Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void disconnect()
public int getCallType()
public int getCommareaLength()
public short getECITimeOut()
public int getExtendMode()
public java.lang.String getHostCodePage()
public com.ibm.vap.ctgadapter.JavaGateway getJavaGateway()
public int getLuwToken()
public int getMessageQualifier()
public java.lang.String getPassword()
public java.lang.String getProgram()
public java.lang.Object getProperty(java.lang.String name)
name
- the property namepublic java.lang.String getServer()
public java.lang.String getTransid()
public java.lang.String getUserid()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public com.ibm.vap.generic.Requester requireRequester() throws com.ibm.vap.generic.CommunicationError
public void setCallType(int newValue) throws com.ibm.vap.generic.CommunicationError
ECI
- call typepublic void setCommareaLength(int newValue)
the
- COMMAREA length that will be send to the serverpublic void setECITimeout(short newValue)
the
- ECI Timeout valuepublic void setExtendMode(int newValue)
the
- ECI Extend_Modepublic void setHostCodePage(java.lang.String newValue)
the
- code page of the host serverpublic void setJavaGateway(com.ibm.vap.ctgadapter.JavaGateway newValue)
instance
- of JavaGateway that must be used to communicate with the serverpublic void setLuwToken(int newValue)
the
- LUW Token identifierpublic void setMessageQualifier(int newValue)
the
- message Idpublic void setPassword(java.lang.String newValue)
the
- password for the CICS user Idpublic void setProgram(java.lang.String newValue)
the
- CICS program namepublic void setProperty(java.lang.String name, java.lang.Object newValue)
name
- the property namenewValue
- the property valuepublic void setServer(java.lang.String newValue)
the
- server namepublic void setTransid(java.lang.String newValue)
the
- transaction ID that must be used by the CICS programpublic void setUserid(java.lang.String newValue)
the
- user Id for CICS
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |