org.jdbcdslog
Class DataSourceProxyBase

java.lang.Object
  extended by org.jdbcdslog.DataSourceProxyBase
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConnectionPoolDataSourceProxy, ConnectionPoolXADataSourceProxy, DataSourceProxy, XADataSourceProxy

public class DataSourceProxyBase
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected static org.slf4j.Logger logger
           
protected  Map<String,Class<?>> propClasses
           
protected  Map<String,Object> props
           
protected static String TARGET_DS_PARAMETER
           
protected  Object targetDs
           
 
Constructor Summary
DataSourceProxyBase()
           
 
Method Summary
 Connection getConnection()
           
 Connection getConnection(String username, String password)
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 Logger getParentLogger()
           
 PooledConnection getPooledConnection()
           
 PooledConnection getPooledConnection(String user, String password)
           
 XAConnection getXAConnection()
           
 XAConnection getXAConnection(String user, String password)
           
protected  void invokeTargetSetMethod(String methodName, Object param, Class<?> paramClass)
           
 boolean isWrapperFor(Class<?> iface)
           
 void setDatabase(String p)
           
 void setDatabaseName(String p)
           
 void setDataSourceName(String p)
           
 void setDescription(String p)
           
 void setDriverType(String p)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
 void setNetworkProtocol(String p)
           
 void setPassword(String p)
           
 void setPortNumber(int p)
           
 void setServerName(String p)
           
 void setServiceName(String p)
           
 void setTargetDS(String targetDSName)
           
 void setTargetDSDirect(Object dataSource)
           
 void setTNSEntryName(String p)
           
 void setURL(String url)
           
 void setUser(String p)
           
<T> T
unwrap(Class<T> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.slf4j.Logger logger

TARGET_DS_PARAMETER

protected static final String TARGET_DS_PARAMETER
See Also:
Constant Field Values

targetDs

protected Object targetDs

props

protected Map<String,Object> props

propClasses

protected Map<String,Class<?>> propClasses
Constructor Detail

DataSourceProxyBase

public DataSourceProxyBase()
                    throws JdbcDsLogRuntimeException
Throws:
JdbcDsLogRuntimeException
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
Throws:
SQLException

getConnection

public Connection getConnection(String username,
                                String password)
                         throws SQLException
Throws:
SQLException

getLogWriter

public PrintWriter getLogWriter()
                         throws SQLException
Throws:
SQLException

getLoginTimeout

public int getLoginTimeout()
                    throws SQLException
Throws:
SQLException

setLogWriter

public void setLogWriter(PrintWriter out)
                  throws SQLException
Throws:
SQLException

setLoginTimeout

public void setLoginTimeout(int seconds)
                     throws SQLException
Throws:
SQLException

getXAConnection

public XAConnection getXAConnection()
                             throws SQLException
Throws:
SQLException

getXAConnection

public XAConnection getXAConnection(String user,
                                    String password)
                             throws SQLException
Throws:
SQLException

getPooledConnection

public PooledConnection getPooledConnection()
                                     throws SQLException
Throws:
SQLException

getPooledConnection

public PooledConnection getPooledConnection(String user,
                                            String password)
                                     throws SQLException
Throws:
SQLException

invokeTargetSetMethod

protected void invokeTargetSetMethod(String methodName,
                                     Object param,
                                     Class<?> paramClass)

setURL

public void setURL(String url)
            throws JdbcDsLogRuntimeException
Throws:
JdbcDsLogRuntimeException

setTargetDSDirect

public void setTargetDSDirect(Object dataSource)

setTargetDS

public void setTargetDS(String targetDSName)
                 throws JdbcDsLogRuntimeException,
                        InstantiationException,
                        IllegalAccessException
Throws:
JdbcDsLogRuntimeException
InstantiationException
IllegalAccessException

setDatabaseName

public void setDatabaseName(String p)

setDescription

public void setDescription(String p)

setDataSourceName

public void setDataSourceName(String p)

setDriverType

public void setDriverType(String p)

setNetworkProtocol

public void setNetworkProtocol(String p)

setPassword

public void setPassword(String p)

setPortNumber

public void setPortNumber(int p)

setServerName

public void setServerName(String p)

setServiceName

public void setServiceName(String p)

setTNSEntryName

public void setTNSEntryName(String p)

setUser

public void setUser(String p)

setDatabase

public void setDatabase(String p)
                 throws JdbcDsLogRuntimeException
Throws:
JdbcDsLogRuntimeException

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
                     throws SQLException
Throws:
SQLException

unwrap

public <T> T unwrap(Class<T> iface)
         throws SQLException
Throws:
SQLException

getParentLogger

public Logger getParentLogger()
                       throws SQLFeatureNotSupportedException
Throws:
SQLFeatureNotSupportedException


Copyright © 2015. All rights reserved.