public class AwsWrapperDataSource
extends java.lang.Object
implements javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected @Nullable java.lang.String |
database |
protected @Nullable java.lang.String |
jdbcProtocol |
protected @Nullable java.lang.String |
jdbcUrl |
protected @Nullable java.io.PrintWriter |
logWriter |
protected @Nullable java.lang.String |
password |
protected @Nullable java.lang.String |
serverName |
protected @Nullable java.lang.String |
serverPort |
protected @Nullable java.lang.String |
targetDataSourceClassName |
protected @Nullable java.util.Properties |
targetDataSourceProperties |
protected @Nullable java.lang.String |
user |
| Constructor and Description |
|---|
AwsWrapperDataSource() |
AwsWrapperDataSource(CoreServicesContainer coreServicesContainer) |
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password) |
@Nullable java.lang.String |
getDatabase() |
@Nullable java.lang.String |
getJdbcProtocol() |
@Nullable java.lang.String |
getJdbcUrl() |
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
java.util.logging.Logger |
getParentLogger() |
java.lang.String |
getPassword() |
javax.naming.Reference |
getReference() |
@Nullable java.lang.String |
getServerName() |
@Nullable java.lang.String |
getServerPort() |
@Nullable java.lang.String |
getTargetDataSourceClassName() |
@Nullable java.util.Properties |
getTargetDataSourceProperties() |
java.lang.String |
getUser() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setDatabase(@NonNull java.lang.String database) |
void |
setJdbcProtocol(@NonNull java.lang.String jdbcProtocol) |
void |
setJdbcUrl(@Nullable java.lang.String url) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(java.io.PrintWriter out) |
void |
setPassword(java.lang.String password) |
void |
setServerName(@NonNull java.lang.String serverName) |
void |
setServerPort(@NonNull java.lang.String serverPort) |
void |
setTargetDataSourceClassName(@Nullable java.lang.String dataSourceClassName) |
void |
setTargetDataSourceProperties(@Nullable java.util.Properties dataSourceProps) |
void |
setUser(java.lang.String user) |
<T> T |
unwrap(java.lang.Class<T> iface) |
protected transient @Nullable java.io.PrintWriter logWriter
protected @Nullable java.lang.String user
protected @Nullable java.lang.String password
protected @Nullable java.lang.String jdbcUrl
protected @Nullable java.lang.String targetDataSourceClassName
protected @Nullable java.util.Properties targetDataSourceProperties
protected @Nullable java.lang.String jdbcProtocol
protected @Nullable java.lang.String serverName
protected @Nullable java.lang.String serverPort
protected @Nullable java.lang.String database
public AwsWrapperDataSource()
public AwsWrapperDataSource(CoreServicesContainer coreServicesContainer)
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic void setTargetDataSourceClassName(@Nullable java.lang.String dataSourceClassName)
public @Nullable java.lang.String getTargetDataSourceClassName()
public void setServerName(@NonNull java.lang.String serverName)
public @Nullable java.lang.String getServerName()
public void setServerPort(@NonNull java.lang.String serverPort)
public @Nullable java.lang.String getServerPort()
public void setDatabase(@NonNull java.lang.String database)
public @Nullable java.lang.String getDatabase()
public void setJdbcUrl(@Nullable java.lang.String url)
public @Nullable java.lang.String getJdbcUrl()
public void setJdbcProtocol(@NonNull java.lang.String jdbcProtocol)
public @Nullable java.lang.String getJdbcProtocol()
public void setTargetDataSourceProperties(@Nullable java.util.Properties dataSourceProps)
public @Nullable java.util.Properties getTargetDataSourceProperties()
public void setUser(java.lang.String user)
public java.lang.String getUser()
public void setPassword(java.lang.String password)
public java.lang.String getPassword()
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
setLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLoginTimeout(int seconds)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
getParentLogger in interface javax.sql.CommonDataSourcejava.sql.SQLFeatureNotSupportedExceptionpublic javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingException