IStatementEventListener Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An object that registers to be notified of events that occur on PreparedStatements that are in the Statement pool.
[Android.Runtime.Register("javax/sql/StatementEventListener", "", "Javax.Sql.IStatementEventListenerInvoker")]
public interface IStatementEventListener : IDisposable, Java.Interop.IJavaPeerable, Java.Util.IEventListener
[<Android.Runtime.Register("javax/sql/StatementEventListener", "", "Javax.Sql.IStatementEventListenerInvoker")>]
type IStatementEventListener = interface
interface IEventListener
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Attributes
- Implements
Remarks
An object that registers to be notified of events that occur on PreparedStatements that are in the Statement pool.
The JDBC 3.0 specification added the maxStatements ConnectionPooledDataSource property to provide a standard mechanism for enabling the pooling of PreparedStatements and to specify the size of the statement pool. However, there was no way for a driver to notify an external statement pool when a PreparedStatement becomes invalid. For some databases, a statement becomes invalid if a DDL operation is performed that affects the table. For example an application may create a temporary table to do some work on the table and then destroy it. It may later recreate the same table when it is needed again. Some databases will invalidate any prepared statements that reference the temporary table when the table is dropped.
Similar to the methods defined in the ConnectionEventListener interface, the driver will call the StatementEventListener.statementErrorOccurred method prior to throwing any exceptions when it detects a statement is invalid. The driver will also call the StatementEventListener.statementClosed method when a PreparedStatement is closed.
Methods which allow a component to register a StatementEventListener with a PooledConnection have been added to the PooledConnection interface.
Added in 1.6.
Java documentation for javax.sql.StatementEventListener.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Properties
| Handle |
Gets the JNI value of the underlying Android object. (Inherited from IJavaObject) |
| JniIdentityHashCode |
Returns the value of |
| JniManagedPeerState |
State of the managed peer. (Inherited from IJavaPeerable) |
| JniPeerMembers |
Member access and invocation support. (Inherited from IJavaPeerable) |
| PeerReference |
Returns a JniObjectReference of the wrapped Java object instance. (Inherited from IJavaPeerable) |
Methods
| Disposed() |
Called when the instance has been disposed. (Inherited from IJavaPeerable) |
| DisposeUnlessReferenced() |
If there are no outstanding references to this instance, then
calls |
| Finalized() |
Called when the instance has been finalized. (Inherited from IJavaPeerable) |
| SetJniIdentityHashCode(Int32) |
Set the value returned by |
| SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from IJavaPeerable) |
| SetPeerReference(JniObjectReference) |
Set the value returned by |
| StatementClosed(StatementEvent) |
The driver calls this method on all |
| StatementErrorOccurred(StatementEvent) |
The driver calls this method on all |
| UnregisterFromRuntime() |
Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations. (Inherited from IJavaPeerable) |
Extension Methods
| JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
| JavaCast<TResult>(IJavaObject) | |
| GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
| JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |