|
|||||||||
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.ccfadapter.CCFAdapter
This server adapter class is used by the VisualAge Pacbase Runtime to communicate with the server using CCF connectors through supported protocols.
This class implements the ServerAdapter methods using the Common Connector Framework interface delivered by IBM. You may then use any connector classes that implements this interface to communicate with the server. In the following exemple we use the CICS Connector (com.ibm.connector.cics.*). The InteractionSpec that retains all interaction-relevant attributes of a CCF Connector, such as a program name or interaction mode, needs to be instantiate an setup by the user. The ConnectionSpec that holds all connection-relevant attributes of a CCF Connector, such as host name, port number, and timeout specifications, needs also to be instatiate an setup by the user. Then you will need to instantiate ccfAdapter class and set it as the current proxy adapter.
Sample code :
// Instantiate the InteractionSpec class com.ibm.connector.cics.ECIInteractionSpec is = new com.ibm.connector.cics.ECIInteractionSpec(); is.setCICSELUW(false); is.setPassword("USERPWD"); is.setProgramName("CLECIN"); is.setTPNTransactionName(true); is.setTransactionName("VEC1"); is.setUserid("USERID"); is.setMode(com.ibm.connector.InteractionSpecModeProperties.MODE_SEND_RECEIVE); //Instantiate the ConnectionSpec class com.ibm.connector.cics.CICSConnectionSpec cs = new com.ibm.connector.cics.CICSConnectionSpec(); cs.setCICSServer("CICSSTMV"); cs.setConnectionTimeout(80); cs.setUnusedTimeout(30); cs.setURL("tcp://9.100.400.170:2000"); try { // Instantiate an Adpater class com.ibm.vap.ccfadapter.CCFAdapter ccfAdapter = new com.ibm.vap.ccfadapter.CCFAdapter(cs,is); ccfAdapter.setCommareaLength(8192); ccfAdapter.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(ccfAdapter); proxy.selectInstances(); 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 | |
CCFAdapter()
Default constructor. |
|
CCFAdapter(com.ibm.vap.ccfadapter.ConnectionSpec cs,
com.ibm.vap.ccfadapter.InteractionSpec is)
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 |
getCommareaLength()
retrieves the messageLength attribut. |
com.ibm.vap.ccfadapter.ConnectionSpec |
getConnectionSpec()
retrieves the connectionSpec attribut. |
java.lang.String |
getHostCodePage()
retrieves the hsot code page attribut. |
com.ibm.vap.ccfadapter.InteractionSpec |
getInteractionSpec()
retrieves the interactionSpec attribut. |
java.lang.Object |
getProperty(java.lang.String name)
Returns the communication parameter for the specified String name. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
com.ibm.vap.generic.Requester |
requireRequester()
Returns an instance of requester associated to this server adapter. |
void |
setCommareaLength(int newValue)
Sets the commareaLength attribut. |
void |
setConnectionSpec(com.ibm.vap.ccfadapter.ConnectionSpec newValue)
Sets the connectionSpec attribut. |
void |
setHostCodePage(java.lang.String newValue)
Sets the host code page attribut. |
void |
setInteractionSpec(com.ibm.vap.ccfadapter.InteractionSpec newValue)
Sets the interactionFactory attribut. |
void |
setProperty(java.lang.String name,
java.lang.Object newValue)
Sets a communication parameter of specified name. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CCFAdapter()
public CCFAdapter(com.ibm.vap.ccfadapter.ConnectionSpec cs, com.ibm.vap.ccfadapter.InteractionSpec is)
cs
- com.ibm.connector.ConnectionSpecis
- com.ibm.connector.InteractionSpecMethod Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void disconnect()
public int getCommareaLength()
public com.ibm.vap.ccfadapter.ConnectionSpec getConnectionSpec()
public java.lang.String getHostCodePage()
public com.ibm.vap.ccfadapter.InteractionSpec getInteractionSpec()
public java.lang.Object getProperty(java.lang.String name)
name
- the property namepublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public com.ibm.vap.generic.Requester requireRequester() throws com.ibm.vap.generic.CommunicationError
public void setCommareaLength(int newValue)
length
- of the commareapublic void setConnectionSpec(com.ibm.vap.ccfadapter.ConnectionSpec newValue)
com.ibm.connector.ConnectionSpec
- public void setHostCodePage(java.lang.String newValue)
the
- value of the host encoding page codepublic void setInteractionSpec(com.ibm.vap.ccfadapter.InteractionSpec newValue)
com.ibm.connector.InteractionSpec
- public void setProperty(java.lang.String name, java.lang.Object newValue)
name
- the property namenewValue
- the property value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |