KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > broker > PBStateListener


1 package org.apache.ojb.broker;
2
3 /* Copyright 2003-2005 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 /**
19  * The listener interface for receiving <code>PersistenceBroker</code>
20  * state changes.
21  *
22  * @author Armin Waibel
23  * @version $Id: PBStateListener.java,v 1.3.2.2 2005/12/21 22:22:07 tomdz Exp $
24  */

25 public interface PBStateListener extends PBListener
26 {
27     /**
28      * Called after the {@link org.apache.ojb.broker.PersistenceBroker} instance was
29      * obtained from the pool.
30      *
31      * @param event The event object
32      */

33     public void afterOpen(PBStateEvent event);
34
35     /**
36      * Called before a transaction was started.
37      *
38      * @param event The event object
39      */

40     public void beforeBegin(PBStateEvent event);
41
42     /**
43      * Called after a transaction was started.
44      *
45      * @param event The event object
46      */

47     public void afterBegin(PBStateEvent event);
48
49     /**
50      * Called before a transaction will be comitted.
51      *
52      * @param event The event object
53      */

54     public void beforeCommit(PBStateEvent event);
55
56     /**
57      * Called after a transaction was comitted.
58      *
59      * @param event The event object
60      */

61     public void afterCommit(PBStateEvent event);
62
63     /**
64      * Called before a transaction will be rolled back.
65      *
66      * @param event The event object
67      */

68     public void beforeRollback(PBStateEvent event);
69
70     /**
71      * Called after a transaction was rolled back.
72      *
73      * @param event The event object
74      */

75     public void afterRollback(PBStateEvent event);
76
77     /**
78      * Called before the {@link org.apache.ojb.broker.PersistenceBroker}
79      * instance will be returned to the pool.
80      *
81      * @param event The event object
82      */

83     public void beforeClose(PBStateEvent event);
84 }
85
Popular Tags