KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quickserver > util > pool > PoolableObject


1 /*
2  * This file is part of the QuickServer library
3  * Copyright (C) 2003-2005 QuickServer.org
4  *
5  * Use, modification, copying and distribution of this software is subject to
6  * the terms and conditions of the GNU Lesser General Public License.
7  * You should have received a copy of the GNU LGP License along with this
8  * library; if not, you can download a copy from <http://www.quickserver.org/>.
9  *
10  * For questions, suggestions, bug-reports, enhancement-requests etc.
11  * visit http://www.quickserver.org
12  *
13  */

14
15 package org.quickserver.util.pool;
16
17 import org.apache.commons.pool.PoolableObjectFactory;
18
19 /**
20  * Interface to be implemented by any user class of QuickServer
21  * so that QuickServer can create a pool of objects and reuse objects
22  * from that pool.
23  * @since 1.3
24  */

25 public interface PoolableObject {
26     /**
27      * Returns weather or not this Object impelementation
28      * can be pooled.
29      */

30     public boolean isPoolable();
31
32     /**
33      * Will return a
34      * {@link org.apache.commons.pool.PoolableObjectFactory} object for
35      * this Object implementation if it is poolable
36      * else will return <code>null</code>
37      */

38     public PoolableObjectFactory getPoolableObjectFactory();
39 }
40
Popular Tags