equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
50 * The driver will also call the <code>StatementEventListener.statementClosed</code> |
50 * The driver will also call the <code>StatementEventListener.statementClosed</code> |
51 * method when a <code>PreparedStatement</code> is closed. |
51 * method when a <code>PreparedStatement</code> is closed. |
52 * <p> |
52 * <p> |
53 * Methods which allow a component to register a StatementEventListener with a |
53 * Methods which allow a component to register a StatementEventListener with a |
54 * <code>PooledConnection</code> have been added to the <code>PooledConnection</code> interface. |
54 * <code>PooledConnection</code> have been added to the <code>PooledConnection</code> interface. |
55 * <p> |
55 * |
56 * @since 1.6 |
56 * @since 1.6 |
57 */ |
57 */ |
58 public interface StatementEventListener extends java.util.EventListener{ |
58 public interface StatementEventListener extends java.util.EventListener{ |
59 /** |
59 /** |
60 * The driver calls this method on all <code>StatementEventListener</code>s registered on the connection when it detects that a |
60 * The driver calls this method on all <code>StatementEventListener</code>s registered on the connection when it detects that a |
70 * The driver calls this method on all <code>StatementEventListener</code>s |
70 * The driver calls this method on all <code>StatementEventListener</code>s |
71 * registered on the connection when it detects that a |
71 * registered on the connection when it detects that a |
72 * <code>PreparedStatement</code> is invalid. The driver calls this method |
72 * <code>PreparedStatement</code> is invalid. The driver calls this method |
73 * just before it throws the <code>SQLException</code>, |
73 * just before it throws the <code>SQLException</code>, |
74 * contained in the given event, to the application. |
74 * contained in the given event, to the application. |
75 * <p> |
75 * |
76 * @param event an event object describing the source of the event, |
76 * @param event an event object describing the source of the event, |
77 * the statement that is invalid and the exception the |
77 * the statement that is invalid and the exception the |
78 * driver is about to throw. The source of the event is |
78 * driver is about to throw. The source of the event is |
79 * the <code>PooledConnection</code> which the invalid <code>PreparedStatement</code> |
79 * the <code>PooledConnection</code> which the invalid <code>PreparedStatement</code> |
80 * is associated with. |
80 * is associated with. |
81 * <p> |
81 * |
82 * @since 1.6 |
82 * @since 1.6 |
83 */ |
83 */ |
84 void statementErrorOccurred(StatementEvent event); |
84 void statementErrorOccurred(StatementEvent event); |
85 |
85 |
86 } |
86 } |