|
|||||||||
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.cciadapter.CCIAdapter
This server adapter class is used by the VisualAge Pacbase Runtime to communicate with the server using J2EE connectors through supported protocols. This class implements the ServerAdapter methods using the Common Client Interface currently delivered as a Beta version 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.connector2.cics.*). The InteractionSpec that retains all interaction-relevant attributes of a CCI Connector, such as a program name or interaction mode, needs to be instantiate an setup by the user. The ConnectionFactory that holds all connection-relevant attributes of a CCI Connector, such as host name, port number, and timeout specifications, needs also to be instantiate an setup by the user. Then you will need to instantiate cciAdapter class and set it as the current proxy ServerAddapter.
Sample code :
com.ibm.connector2.cics.ECIManagedConnectionFactory mcf = new com.ibm.connector2.cics.ECIManagedConnectionFactory(); mcf.setPassword("PASSWORD"); mcf.setServerName("CICSSTMV"); mcf.setTPNName("VEC1"); mcf.setUserName("USER"); mcf.setConnectionURL("tcp://9.100.400.170:2000"); com.ibm.connector2.cics.ECIConnectionFactory cf = (com.ibm.connector2.cics.ECIConnectionFactory)mcf.createConnectionFactory(); com.ibm.connector2.cics.ECIConnectionSpec cs = new com.ibm.connector2.cics.ECIConnectionSpec(); com.ibm.connector2.cics.ECIInteractionSpec is = new com.ibm.connector2.cics.ECIInteractionSpec(); is.setCommareaLength(8192); is.setFunctionName("CLECIN"); try { com.ibm.vap.cciadapter.CCIAdapter cciAdapter = new com.ibm.vap.cciadapter.CCIAdapter(cf,cs,is); cciAdapter.setHostCodePage("Cp1147"); com.ibm.vap.generated.proxies.CustomerProxyLv proxy = new com.ibm.vap.generated.proxies.CustomerProxyLv(); proxy.setServerAdapter(cciAdapter); proxy.selectInstances(); return proxy.rows(); } catch (com.ibm.vap.generic.CommunicationError ce) { return ce.getMessage(); }
ServerAdapter
Constructor Summary | |
CCIAdapter()
Default constructor. |
|
CCIAdapter(com.ibm.vap.cciadapter.ConnectionFactory connectionFactory,
com.ibm.vap.cciadapter.ConnectionSpec connection,
com.ibm.vap.cciadapter.InteractionSpec interaction)
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()
Retreives by introspection the CommareaLength set in the specific IneractionSpec class |
com.ibm.vap.cciadapter.ConnectionFactory |
getConnectionFactory()
retrieves the connectionFactory attribut. |
com.ibm.vap.cciadapter.ConnectionSpec |
getConnectionSpec()
retrieves the connectionSpec attribut. |
java.lang.String |
getHostCodePage()
retrieves the hsot code page attribut. |
com.ibm.vap.cciadapter.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 |
setConnectionFactory(com.ibm.vap.cciadapter.ConnectionFactory newValue)
Sets the connectionFactory attribut. |
void |
setConnectionSpec(com.ibm.vap.cciadapter.ConnectionSpec newValue)
Sets the connectionSpec attribut. |
void |
setHostCodePage(java.lang.String newValue)
Sets the host code page attribut. |
void |
setInteractionSpec(com.ibm.vap.cciadapter.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 CCIAdapter()
public CCIAdapter(com.ibm.vap.cciadapter.ConnectionFactory connectionFactory, com.ibm.vap.cciadapter.ConnectionSpec connection, com.ibm.vap.cciadapter.InteractionSpec interaction)
connectionFactory
- javax.resource.cci.ConnectionFactoryconnection
- javax.resource.cci.ConnectionSpecinteraction
- javax.resource.cci.InteractionSpecMethod Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void disconnect()
public int getCommareaLength()
public com.ibm.vap.cciadapter.ConnectionFactory getConnectionFactory()
public com.ibm.vap.cciadapter.ConnectionSpec getConnectionSpec()
public java.lang.String getHostCodePage()
public com.ibm.vap.cciadapter.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 setConnectionFactory(com.ibm.vap.cciadapter.ConnectionFactory newValue)
javax.resource.cci.ConnectionFactory
- public void setConnectionSpec(com.ibm.vap.cciadapter.ConnectionSpec newValue)
javax.resource.cci.ConnectionSpec
- public void setHostCodePage(java.lang.String newValue)
String
- representation of the hsot code pagepublic void setInteractionSpec(com.ibm.vap.cciadapter.InteractionSpec newValue)
javax.resource.cci.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 |