| com.mysql.jdbc.JDBC4ClientInfoProvider
All known Subclasses: com.mysql.jdbc.JDBC4ClientInfoProviderSP, com.mysql.jdbc.JDBC4CommentClientInfoProvider,
JDBC4ClientInfoProvider | public interface JDBC4ClientInfoProvider (Code) | | Classes that implement this interface and provide a no-args constructor
can be used by the driver to store and retrieve client information and/or
labels.
The driver will create an instance for each Connection instance, and call
initialize() once and only once. When the connection is closed, destroy()
will be called, and the provider is expected to clean up any resources at
this time.
version: $Id: $ |
destroy | public void destroy() throws SQLException(Code) | | Called once by the driver when the connection this provider instance
belongs to is being closed.
Implementations are expected to clean up and resources at this point
in time.
throws: SQLException - if an error occurs. |
getClientInfo | public Properties getClientInfo(java.sql.Connection conn) throws SQLException(Code) | | Returns the client info for the connection that this provider
instance belongs to. The connection instance is passed as an argument
for convenience's sake.
Providers can use the connection to communicate with the database,
but it will be within the scope of any ongoing transactions, so therefore
implementations should not attempt to change isolation level, autocommit settings
or call rollback() or commit() on the connection.
Parameters: conn - throws: SQLException - See Also: java.sql.Connection.getClientInfo |
getClientInfo | public String getClientInfo(java.sql.Connection conn, String name) throws SQLException(Code) | | Returns the client info for the connection that this provider
instance belongs to. The connection instance is passed as an argument
for convenience's sake.
Providers can use the connection to communicate with the database,
but it will be within the scope of any ongoing transactions, so therefore
implementations should not attempt to change isolation level, autocommit settings
or call rollback() or commit() on the connection.
Parameters: conn - throws: SQLException - See Also: java.sql.Connection.getClientInfo(java.lang.String) |
initialize | public void initialize(java.sql.Connection conn, Properties configurationProps) throws SQLException(Code) | | Called once by the driver when it needs to configure the provider.
Parameters: conn - the connection that the provider belongs too. Parameters: configurationProps - a java.util.Properties instance that containsconfiguration information for the connection. throws: SQLException - if initialization fails. |
setClientInfo | public void setClientInfo(java.sql.Connection conn, Properties properties) throws SQLClientInfoException(Code) | | Sets the client info for the connection that this provider
instance belongs to. The connection instance is passed as an argument
for convenience's sake.
Providers can use the connection to communicate with the database,
but it will be within the scope of any ongoing transactions, so therefore
implementations should not attempt to change isolation level, autocommit settings
or call rollback() or commit() on the connection.
Parameters: conn - throws: SQLException - See Also: java.sql.Connection.setClientInfo(java.util.Properties) |
|
|