public class DecoratingDataSource extends DelegatingDataSource
ConnectionDecorators.| Constructor and Description |
|---|
DecoratingDataSource(DataSource ds)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDecorator(ConnectionDecorator decorator)
Add a connection decorator.
|
void |
addDecorators(Collection<ConnectionDecorator> decorators)
Add multiple connection decorators efficiently.
|
void |
clearDecorators()
Clear all decorators.
|
Connection |
getConnection() |
Connection |
getConnection(String user,
String pass) |
Collection<ConnectionDecorator> |
getDecorators()
Return a read-only list of connection decorators in the order they were
added.
|
boolean |
removeDecorator(ConnectionDecorator decorator)
Remove a connection decorator.
|
appendInfo, close, equals, getDelegate, getInnermostDelegate, getLoginTimeout, getLogWriter, getParentLogger, hashCode, isWrapperFor, setLoginTimeout, setLogWriter, toString, unwrappublic DecoratingDataSource(DataSource ds)
public Collection<ConnectionDecorator> getDecorators()
public void addDecorator(ConnectionDecorator decorator)
public void addDecorators(Collection<ConnectionDecorator> decorators)
public boolean removeDecorator(ConnectionDecorator decorator)
public void clearDecorators()
public Connection getConnection() throws SQLException
getConnection in interface DataSourcegetConnection in class DelegatingDataSourceSQLExceptionpublic Connection getConnection(String user, String pass) throws SQLException
getConnection in interface DataSourcegetConnection in class DelegatingDataSourceSQLExceptionCopyright © 2006–2022 Apache Software Foundation. All rights reserved.