|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mysql.jdbc.jdbc2.optional.ConnectionWrapper
com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper
public class JDBC4ConnectionWrapper
| Field Summary | |
|---|---|
protected MysqlPooledConnection |
pooledConnection
|
protected java.util.Map |
unwrappedInterfaces
|
| Fields inherited from class com.mysql.jdbc.jdbc2.optional.ConnectionWrapper |
|---|
mc |
| Fields inherited from interface java.sql.Connection |
|---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Constructor Summary | |
|---|---|
JDBC4ConnectionWrapper(MysqlPooledConnection mysqlPooledConnection,
Connection mysqlConnection,
boolean forXa)
Construct a new LogicalHandle and set instance variables |
|
| Method Summary | ||
|---|---|---|
protected void |
checkAndFireConnectionError(java.sql.SQLException sqlEx)
Fires connection error event if required, before re-throwing exception |
|
void |
close()
The physical connection is not actually closed. |
|
java.sql.Array |
createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
|
|
java.sql.Blob |
createBlob()
|
|
java.sql.Clob |
createClob()
|
|
java.sql.NClob |
createNClob()
|
|
java.sql.SQLXML |
createSQLXML()
|
|
java.sql.Struct |
createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
|
|
java.util.Properties |
getClientInfo()
|
|
java.lang.String |
getClientInfo(java.lang.String name)
|
|
boolean |
isValid(int timeout)
Returns true if the connection has not been closed and is still valid. |
|
boolean |
isWrapperFor(java.lang.Class<?> iface)
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. |
|
void |
setClientInfo(java.util.Properties properties)
|
|
void |
setClientInfo(java.lang.String name,
java.lang.String value)
|
|
|
unwrap(java.lang.Class<T> iface)
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MysqlPooledConnection pooledConnection
protected java.util.Map unwrappedInterfaces
| Constructor Detail |
|---|
public JDBC4ConnectionWrapper(MysqlPooledConnection mysqlPooledConnection,
Connection mysqlConnection,
boolean forXa)
throws java.sql.SQLException
mysqlPooledConnection - reference to object that instantiated this objectmysqlConnection - physical connection to db
java.sql.SQLException - if an error occurs.| Method Detail |
|---|
public void close()
throws java.sql.SQLException
ConnectionWrapper
close in interface java.sql.Connectionclose in class ConnectionWrapperjava.sql.SQLException - if an error occurs
public java.sql.SQLXML createSQLXML()
throws java.sql.SQLException
createSQLXML in interface java.sql.ConnectioncreateSQLXML in class ConnectionWrapperjava.sql.SQLException
public java.sql.Array createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
throws java.sql.SQLException
createArrayOf in interface java.sql.ConnectioncreateArrayOf in class ConnectionWrapperjava.sql.SQLException
public java.sql.Struct createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
throws java.sql.SQLException
createStruct in interface java.sql.ConnectioncreateStruct in class ConnectionWrapperjava.sql.SQLException
public java.util.Properties getClientInfo()
throws java.sql.SQLException
getClientInfo in interface java.sql.ConnectiongetClientInfo in class ConnectionWrapperjava.sql.SQLException
public java.lang.String getClientInfo(java.lang.String name)
throws java.sql.SQLException
getClientInfo in interface java.sql.ConnectiongetClientInfo in class ConnectionWrapperjava.sql.SQLException
public boolean isValid(int timeout)
throws java.sql.SQLException
The query submitted by the driver to validate the connection shall be executed in the context of the current transaction.
isValid in interface java.sql.ConnectionisValid in class ConnectionWrappertimeout - -
The time in seconds to wait for the database operation used to
validate the connection to complete. If the timeout period
expires before the operation completes, this method returns
false. A value of 0 indicates a timeout is not applied to the
database operation.
java.sql.SQLException - if the value supplied for timeout is less
then 0
public void setClientInfo(java.util.Properties properties)
throws java.sql.SQLClientInfoException
setClientInfo in interface java.sql.ConnectionsetClientInfo in class ConnectionWrapperjava.sql.SQLClientInfoException
public void setClientInfo(java.lang.String name,
java.lang.String value)
throws java.sql.SQLClientInfoException
setClientInfo in interface java.sql.ConnectionsetClientInfo in class ConnectionWrapperjava.sql.SQLClientInfoException
public boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor on the wrapped object. If this does not
implement the interface and is not a wrapper, return false. This method
should be implemented as a low-cost operation compared to
unwrap so that callers can use this method to avoid
expensive unwrap calls that may fail. If this method
returns true then calling unwrap with the same argument
should succeed.
isWrapperFor in interface java.sql.WrapperisWrapperFor in class ConnectionWrapperinterfaces - a Class defining an interface.
java.sql.SQLException - if an error occurs while determining whether this is a
wrapper for an object with the given interface.
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap recursively on the wrapped
object. If the receiver is not a wrapper and does not implement the
interface, then an SQLException is thrown.
unwrap in interface java.sql.Wrapperunwrap in class ConnectionWrapperiface - A Class defining an interface that the result must implement.
java.sql.SQLException - If no object found that implements the interface
public java.sql.Blob createBlob()
throws java.sql.SQLException
createBlob in interface java.sql.ConnectioncreateBlob in class ConnectionWrapperjava.sql.SQLExceptionConnection.createBlob()
public java.sql.Clob createClob()
throws java.sql.SQLException
createClob in interface java.sql.ConnectioncreateClob in class ConnectionWrapperjava.sql.SQLExceptionConnection.createClob()
public java.sql.NClob createNClob()
throws java.sql.SQLException
createNClob in interface java.sql.ConnectioncreateNClob in class ConnectionWrapperjava.sql.SQLExceptionConnection.createNClob()
protected void checkAndFireConnectionError(java.sql.SQLException sqlEx)
throws java.sql.SQLException
sqlEx - the SQLException that has ocurred
java.sql.SQLException - (rethrown)
|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||