org.objectweb.cjdbc.scenario.tools.mock
Class MockConnectionManager

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.connection.AbstractConnectionManager
      extended byorg.objectweb.cjdbc.scenario.tools.mock.MockConnectionManager
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, XmlComponent

public class MockConnectionManager
extends AbstractConnectionManager

Mock connection manager.

Author:
Mathieu Peltier
See Also:
AbstractConnectionManager, Serialized Form

Nested Class Summary
 class MockConnectionManager.MockDatabaseMetaData
          Mock database meta data.
 
Field Summary
private  MockConnection2 connection
          Fake connection.
private  boolean isInitialized
          true if the connections have been initialized.
 
Fields inherited from class org.objectweb.cjdbc.controller.connection.AbstractConnectionManager
backendName, backendUrl, driverClassName, driverPath, initialized, rLogin, rPassword
 
Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent
DOCTYPE_DB, XML_VERSION
 
Constructor Summary
MockConnectionManager(AbstractDatabase database)
          Creates a new MockConnectionManager instance.
 
Method Summary
protected  java.lang.Object clone()
           
 void deleteConnection(java.sql.Connection connection)
           
 void finalizeConnections()
           
 java.sql.Connection getConnection()
           
 int getCurrentNumberOfConnections()
           
 java.lang.String getXmlImpl()
           
 void initializeConnections()
           
 boolean isInitialized()
           
 void releaseConnection(java.sql.Connection connection)
           
 
Methods inherited from class org.objectweb.cjdbc.controller.connection.AbstractConnectionManager
copy, deleteConnection, finalize, getConnection, getConnectionFromDriver, getDriverClassName, getDriverPath, getLogin, getPassword, getVLogin, getXml, releaseConnection, retrieveConnection, setDriverClassName, setDriverPath, setLogin, setPassword, setVLogin
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

private MockConnection2 connection
Fake connection.


isInitialized

private boolean isInitialized
true if the connections have been initialized.

Constructor Detail

MockConnectionManager

public MockConnectionManager(AbstractDatabase database)
Creates a new MockConnectionManager instance.

Parameters:
database - AbstractDatabase instance.
Method Detail

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()

finalizeConnections

public void finalizeConnections()
                         throws java.sql.SQLException
Throws:
java.sql.SQLException
See Also:
AbstractConnectionManager.finalizeConnections()

getConnection

public java.sql.Connection getConnection()
See Also:
AbstractConnectionManager.getConnection()

initializeConnections

public void initializeConnections()
                           throws java.sql.SQLException
Throws:
java.sql.SQLException
See Also:
AbstractConnectionManager.initializeConnections()

isInitialized

public boolean isInitialized()
See Also:
AbstractConnectionManager.isInitialized()

releaseConnection

public void releaseConnection(java.sql.Connection connection)
See Also:
AbstractConnectionManager.releaseConnection(java.sql.Connection)

deleteConnection

public void deleteConnection(java.sql.Connection connection)
See Also:
AbstractConnectionManager.deleteConnection(java.sql.Connection)

getCurrentNumberOfConnections

public int getCurrentNumberOfConnections()
See Also:
AbstractConnectionManager.getCurrentNumberOfConnections()

getXmlImpl

public java.lang.String getXmlImpl()
See Also:
AbstractConnectionManager.getXmlImpl()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.