|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JDBC4ClientInfoProvider
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.
Method Summary | |
---|---|
void |
destroy()
Called once by the driver when the connection this provider instance belongs to is being closed. |
java.util.Properties |
getClientInfo(java.sql.Connection conn)
Returns the client info for the connection that this provider instance belongs to. |
java.lang.String |
getClientInfo(java.sql.Connection conn,
java.lang.String name)
Returns the client info for the connection that this provider instance belongs to. |
void |
initialize(java.sql.Connection conn,
java.util.Properties configurationProps)
Called once by the driver when it needs to configure the provider. |
void |
setClientInfo(java.sql.Connection conn,
java.util.Properties properties)
Sets the client info for the connection that this provider instance belongs to. |
void |
setClientInfo(java.sql.Connection conn,
java.lang.String name,
java.lang.String value)
Sets the client info for the connection that this provider instance belongs to. |
Method Detail |
---|
void initialize(java.sql.Connection conn, java.util.Properties configurationProps) throws java.sql.SQLException
conn
- the connection that the provider belongs too.configurationProps
- a java.util.Properties instance that contains
configuration information for the connection.
java.sql.SQLException
- if initialization fails.void destroy() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs.java.util.Properties getClientInfo(java.sql.Connection conn) throws java.sql.SQLException
conn
-
java.sql.SQLException
Connection.getClientInfo()
java.lang.String getClientInfo(java.sql.Connection conn, java.lang.String name) throws java.sql.SQLException
conn
-
java.sql.SQLException
Connection.getClientInfo(java.lang.String)
void setClientInfo(java.sql.Connection conn, java.util.Properties properties) throws java.sql.SQLClientInfoException
conn
-
java.sql.SQLException
java.sql.SQLClientInfoException
Connection.setClientInfo(java.util.Properties)
void setClientInfo(java.sql.Connection conn, java.lang.String name, java.lang.String value) throws java.sql.SQLClientInfoException
conn
-
java.sql.SQLException
java.sql.SQLClientInfoException
Connection.setClientInfo(java.lang.String,java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |