com.p6spy.engine.spy
Class P6DataSource

java.lang.Object
  extended bycom.p6spy.engine.spy.P6Base
      extended bycom.p6spy.engine.spy.P6DataSource
All Implemented Interfaces:
DataSource, Referenceable, Serializable
Direct Known Subclasses:
P6ConnectionPoolDataSource

public class P6DataSource
extends P6Base
implements DataSource, Referenceable, Serializable

See Also:
Serialized Form

Field Summary
protected  DataSource rds
           
protected  String rdsName
           
 
Fields inherited from class com.p6spy.engine.spy.P6Base
factory
 
Constructor Summary
P6DataSource()
          Default no-arg constructor for Serialization
 
Method Summary
protected  void bindDataSource()
           
 Connection getConnection()
           
 Connection getConnection(String username, String password)
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 String getRealDataSource()
           
 Reference getReference()
          Required method to support this class as a Referenceable.
static void initMethod()
           
 void setLoginTimeout(int inVar)
           
 void setLogWriter(PrintWriter inVar)
           
 void setRealDataSource(String inVar)
           
 
Methods inherited from class com.p6spy.engine.spy.P6Base
getP6Factory, setP6Factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rds

protected DataSource rds

rdsName

protected String rdsName
Constructor Detail

P6DataSource

public P6DataSource()
Default no-arg constructor for Serialization

Method Detail

initMethod

public static void initMethod()

getRealDataSource

public String getRealDataSource()

setRealDataSource

public void setRealDataSource(String inVar)

bindDataSource

protected void bindDataSource()
                       throws SQLException
Throws:
SQLException

getReference

public Reference getReference()
                       throws NamingException
Required method to support this class as a Referenceable.

Specified by:
getReference in interface Referenceable
Throws:
NamingException

getLoginTimeout

public int getLoginTimeout()
                    throws SQLException
Specified by:
getLoginTimeout in interface DataSource
Throws:
SQLException

setLoginTimeout

public void setLoginTimeout(int inVar)
                     throws SQLException
Specified by:
setLoginTimeout in interface DataSource
Throws:
SQLException

getLogWriter

public PrintWriter getLogWriter()
                         throws SQLException
Specified by:
getLogWriter in interface DataSource
Throws:
SQLException

setLogWriter

public void setLogWriter(PrintWriter inVar)
                  throws SQLException
Specified by:
setLogWriter in interface DataSource
Throws:
SQLException

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException

getConnection

public Connection getConnection(String username,
                                String password)
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException