Sun Adapter for DB2 Connect

com.stc.connector.db2connectadapter.appconn
Class DbApplicationConnection

java.lang.Object
  extended by com.stc.connector.db2connectadapter.appconn.DbApplicationConnection
All Implemented Interfaces:
com.stc.connector.appconn.common.ApplicationConnection
Direct Known Subclasses:
Db2ConnectApplicationConnection

public class DbApplicationConnection
extends java.lang.Object
implements com.stc.connector.appconn.common.ApplicationConnection

This class implements the ApplicationConnection interface for the Db Application Connection.

Version:
$Revision: 1.3 $
Author:
$Author: pveerava $

Field Summary
protected  com.stc.connector.db.DbConnector mDbConnector
          A database connector which provides an entry point to all the DB eWay services.
 
Constructor Summary
DbApplicationConnection()
          Default constructor.
DbApplicationConnection(javax.sql.DataSource ds)
          Creates a new instance of DbApplicationConnection.
DbApplicationConnection(javax.sql.DataSource ds, java.util.Properties connProps)
          Creates a new instance of DbApplicationConnection.
 
Method Summary
 void close()
          Closes the application connection handle using the cci conn handle
 java.lang.Object createApplication(java.lang.String appName)
          Creates an Application from the Application Connection.
 com.stc.connector.appconn.common.OutputHandler createOutputHandler()
          Creates an OutputHandler for "sending" data to the EIS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mDbConnector

protected com.stc.connector.db.DbConnector mDbConnector
A database connector which provides an entry point to all the DB eWay services.

Constructor Detail

DbApplicationConnection

public DbApplicationConnection()
Default constructor.


DbApplicationConnection

public DbApplicationConnection(javax.sql.DataSource ds)
Creates a new instance of DbApplicationConnection.

Parameters:
ds - the ManagedConnection which created this connection. In database, this is the DataSource.

DbApplicationConnection

public DbApplicationConnection(javax.sql.DataSource ds,
                               java.util.Properties connProps)
Creates a new instance of DbApplicationConnection.

Parameters:
ds - the ManagedConnection which created this connection. In database, this is the DataSource.
connProps - connection properties. An example is user name.
Method Detail

close

public void close()
           throws com.stc.connector.appconn.common.ApplicationConnectionException
Closes the application connection handle using the cci conn handle

Specified by:
close in interface com.stc.connector.appconn.common.ApplicationConnection
Throws:
com.stc.connector.appconn.common.ApplicationConnectionException - upon error.

createApplication

public java.lang.Object createApplication(java.lang.String appName)
                                   throws com.stc.connector.appconn.common.ApplicationException
Creates an Application from the Application Connection. The application is an API which can be used to interact with the underlying EIS synchronously. The application API must be invalidated once the close method is called on the Application Connection.

Specified by:
createApplication in interface com.stc.connector.appconn.common.ApplicationConnection
Parameters:
appName - name of the application. In case of DB, this is the OTD name.
Returns:
An Object representing the EIS specific application component to interact with the EIS.
Throws:
com.stc.connector.appconn.common.ApplicationException - upon error.

createOutputHandler

public com.stc.connector.appconn.common.OutputHandler createOutputHandler()
                                                                   throws com.stc.connector.appconn.common.ApplicationException
Creates an OutputHandler for "sending" data to the EIS. If the eWay does not support an OutputHandler, then it should return null for its implementation of this method. This is not applicable to database.

Specified by:
createOutputHandler in interface com.stc.connector.appconn.common.ApplicationConnection
Returns:
The eWay specific OutputHandler for handling "sending" data to the external system or null if the eWay does not have an OutputHandler.
Throws:
com.stc.connector.appconn.common.ApplicationException - upon error.

Sun Adapter for DB2 Connect