public class ConnectionInfo extends Object implements Comparable<ConnectionInfo>, DataSource
| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectionInfo.Flavor |
| Constructor and Description |
|---|
ConnectionInfo() |
ConnectionInfo(String s) |
ConnectionInfo(String d,
String u,
String un,
String pw) |
public ConnectionInfo()
public ConnectionInfo(String s) throws SQLException
SQLExceptionpublic void close()
public void setSchema(String schema)
public String getSchema()
public void setCatalog(String catalog)
public String getCatalog()
public int compareTo(ConnectionInfo o)
compareTo in interface Comparable<ConnectionInfo>public boolean isConnected()
public Connection initDefaultConnection() throws SQLException
SQLExceptionpublic Connection connect() throws SQLException
SQLExceptionpublic String getUrl()
public void setUrl(String url)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getDriverClass()
public void setDriverClass(String driverClass)
public Connection getDefaultConnection()
public void setDefaultConnection(Connection connection)
public Driver getDriver()
public void setDriver(Driver driver)
public ConnectionInfo.Flavor getFlavor()
public void setFlavor(ConnectionInfo.Flavor flavor)
public String getPasswordB64()
public void setPasswordB64(String passwordB64)
public long getLastConnectTime()
public void setLastConnectTime(long lastConnectTime)
public PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionCopyright © 2015. All rights reserved.