IStatementEventListener Interface

Definition

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 java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
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 Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
StatementClosed(StatementEvent)

The driver calls this method on all StatementEventListeners registered on the connection when it detects that a PreparedStatement is closed.

StatementErrorOccurred(StatementEvent)

The driver calls this method on all StatementEventListeners registered on the connection when it detects that a PreparedStatement is invalid.

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)

Applies to