Package oracle.dbtools.plugin.api.jdbc
Interface JDBCDataSource
- All Superinterfaces:
Function<String,,Connection> Iterable<String>
Provides information about a
DataSource- Author:
- cdivilly
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ConnectionObtains a connection for the specified schema.booleanauthenticate(String username, char[] password) Authenticates the specified user against this data source.connection(String schema) Provides aConnectionto the named schema, IFF the schema is availabledefault HostContextProvides information about the host such as the hostname, the location of the host file and the last modified time.iterator()schemas()Enumerates the available JDBC schemas for a givenJDBCDataSource, to which aConnectionmay be openedRetrieve the service identification.static RuntimeExceptionwrap(SQLException e) Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
apply
default Connection apply(String schema) throws IllegalArgumentException, IllegalStateException, RuntimeException Obtains a connection for the specified schema.- Specified by:
applyin interfaceFunction<String,Connection> - Returns:
- the connection if available
- Throws:
IllegalArgumentException- if the schema is not found. The cause is anSQLTransientConnectionExceptionwith a SQL State of08003IllegalStateException- if the connection creation was rejected by the server. The cause is anSQLTransientConnectionExceptionwith a SQL State of08004RuntimeException- if the client cloud not connect to the server. The cause is anSQLTransientConnectionExceptionwith a SQL State of08001
-
connection
Provides aConnectionto the named schema, IFF the schema is available- Parameters:
schema- The name of the schema to connect to- Returns:
Connectioninstance pointing to the schema- Throws:
SchemaNotAvailableException- if the requested schema does not exist or is not availableSQLException- if an error occurs connecting to the requested schema
-
authenticate
Authenticates the specified user against this data source.- Parameters:
username- - the database userpassword- - the password- Returns:
- true if the authentication is successful
-
hostContext
Provides information about the host such as the hostname, the location of the host file and the last modified time.- Returns:
HostContext
-
serviceID
String serviceID()Retrieve the service identification.- Returns:
- service id
-
iterator
-
schemas
Enumerates the available JDBC schemas for a givenJDBCDataSource, to which aConnectionmay be opened- Returns:
- Set of schema names
- Throws:
SQLException- if an error occurs while processing this request
-
wrap
-