org.eclipse.datatools.connectivity
Class DriverConnectionBase

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.VersionProviderConnection
      extended byorg.eclipse.datatools.connectivity.DriverConnectionBase
All Implemented Interfaces:
IConnection, IServerVersionProvider
Direct Known Subclasses:
JDBCConnection

public abstract class DriverConnectionBase
extends VersionProviderConnection

Base implementation for a connection that uses the driver framework. Sub-classes should invoke open() from their constructor to create the connection. This class takes care of working with the driver management framework, including setting up the class loader required for locating connection classes. This class depends on the org.eclipse.datatools.connectivity.ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID property being set on the connection profile.

Author:
rcernich

Constructor Summary
DriverConnectionBase(IConnectionProfile profile, java.lang.Class factoryClass)
           
 
Method Summary
 java.lang.Throwable getConnectException()
          Return exception in connection
 java.lang.Object getRawConnection()
          Returns the native object representing the connection to the server.
 void open()
          opens a connection to the server identified by the connection profile.
 
Methods inherited from class org.eclipse.datatools.connectivity.VersionProviderConnection
getConnectionFactoryClass, getConnectionProfile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.datatools.connectivity.IConnection
close
 
Methods inherited from interface org.eclipse.datatools.connectivity.IServerVersionProvider
getProviderName, getProviderVersion, getTechnologyName, getTechnologyVersion
 

Constructor Detail

DriverConnectionBase

public DriverConnectionBase(IConnectionProfile profile,
                            java.lang.Class factoryClass)
Method Detail

open

public void open()
opens a connection to the server identified by the connection profile.


getRawConnection

public java.lang.Object getRawConnection()
Description copied from interface: IConnection
Returns the native object representing the connection to the server. For example, a java.sql.Connection object for a JDBC connection.

Returns:
an object representing the native connection to the server.

getConnectException

public java.lang.Throwable getConnectException()
Description copied from interface: IConnection
Return exception in connection

Returns:
exception thrown when connecting to the server


Copyright © 2007 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.