public class ClientInfoProviderSP extends java.lang.Object implements ClientInfoProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PNAME_clientInfoDatabase |
static java.lang.String |
PNAME_clientInfoGetBulkSPName |
static java.lang.String |
PNAME_clientInfoGetSPName |
static java.lang.String |
PNAME_clientInfoSetSPName |
Constructor and Description |
---|
ClientInfoProviderSP() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final java.lang.String PNAME_clientInfoSetSPName
public static final java.lang.String PNAME_clientInfoGetSPName
public static final java.lang.String PNAME_clientInfoGetBulkSPName
public static final java.lang.String PNAME_clientInfoDatabase
public void initialize(java.sql.Connection conn, java.util.Properties configurationProps) throws java.sql.SQLException
ClientInfoProvider
initialize
in interface ClientInfoProvider
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.public void destroy() throws java.sql.SQLException
ClientInfoProvider
destroy
in interface ClientInfoProvider
java.sql.SQLException
- if an error occurs.public java.util.Properties getClientInfo(java.sql.Connection conn) throws java.sql.SQLException
ClientInfoProvider
getClientInfo
in interface ClientInfoProvider
conn
- connection objectjava.sql.SQLException
- if an error occursConnection.getClientInfo()
public java.lang.String getClientInfo(java.sql.Connection conn, java.lang.String name) throws java.sql.SQLException
ClientInfoProvider
getClientInfo
in interface ClientInfoProvider
conn
- connection objectname
- property namejava.sql.SQLException
- if an error occursConnection.getClientInfo(java.lang.String)
public void setClientInfo(java.sql.Connection conn, java.util.Properties properties) throws java.sql.SQLClientInfoException
ClientInfoProvider
setClientInfo
in interface ClientInfoProvider
conn
- connection objectproperties
- Properties objectjava.sql.SQLClientInfoException
- if an error occursConnection.setClientInfo(java.util.Properties)
public void setClientInfo(java.sql.Connection conn, java.lang.String name, java.lang.String value) throws java.sql.SQLClientInfoException
ClientInfoProvider
setClientInfo
in interface ClientInfoProvider
conn
- connection objectname
- property namevalue
- property valuejava.sql.SQLClientInfoException
- if an error occursConnection.setClientInfo(java.lang.String,java.lang.String)