public class BackendInfo extends Object
| Constructor and Description |
|---|
BackendInfo(Backend backend)
Creates a backend info from a backend.
The info cannot be used to connect. |
BackendInfo(Properties backendProperties)
Creates a backend info from backend properties.
The info is able to create a connection. |
BackendInfo(String backendName)
Creates a backend info from a backend name.
The info cannot be used to connect. |
BackendInfo(String url,
String user,
char[] password,
String[] schemas)
Creates a backend info from a url.
The info is able to create a connection. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearPassword()
Clears all passwords (stored in char[]-arrays) so
that they are no more visible in memory.
|
Connection |
connect()
Creates a connection.
|
Backend |
getBackend()
Gets the backend.
|
DataSource |
getJndiDataSource()
Gets the JNDI source.
|
char[] |
getPassword()
Gets the connection password.
|
String[] |
getSchemas()
Gets the schemas.
|
String |
getUrl()
Gets the connection url.
|
String |
getUser()
Gets the username to connect.
|
boolean |
isConnectable()
Returns whether backend info can be used to connect.
|
boolean |
isRemote()
Returns whether this backend is remote.
|
String |
toString() |
public BackendInfo(Backend backend)
backend - the backendpublic BackendInfo(String backendName)
backendName - the backend namepublic BackendInfo(String url, String user, char[] password, String[] schemas)
url - the urluser - the usernamepassword - the passwordschemas - the optional schemas, null if no schema checkpublic BackendInfo(Properties backendProperties)
backendProperties - the propertiespublic Backend getBackend()
public boolean isRemote()
public DataSource getJndiDataSource()
public String getUrl()
public String getUser()
public char[] getPassword()
public void clearPassword()
public String[] getSchemas()
public boolean isConnectable()
public Connection connect() throws SQLException
SQLException - if connection could not be createdCopyright © 2016 Krake Softwaretechnik. All rights reserved.