KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ofbiz > minerva > pool > PooledObject


1 /*
2  * Licensed under the X license (see http://www.x.org/terms.htm)
3  */

4 package org.ofbiz.minerva.pool;
5
6 /**
7  * Optional interface for an object in an ObjectPool. If the objects created
8  * by the ObjcetFactory implement this, the pool will register as a listener
9  * when an object is checked out, and deregister when the object is returned.
10  * Then if the object sends a close or error event, the pool will return the
11  * object to the pool without the client having to do so explicitly.
12  *
13  * @author Aaron Mulder (ammulder@alumni.princeton.edu)
14  */

15 public interface PooledObject {
16
17     /**
18      * Adds a new listener.
19      */

20     public void addPoolEventListener(PoolEventListener listener);
21
22     /**
23      * Removes a listener.
24      */

25     public void removePoolEventListener(PoolEventListener listener);
26 }
27
Popular Tags