001 package org.apache.fulcrum.pool; 002 003 004 /* 005 * Licensed to the Apache Software Foundation (ASF) under one 006 * or more contributor license agreements. See the NOTICE file 007 * distributed with this work for additional information 008 * regarding copyright ownership. The ASF licenses this file 009 * to you under the Apache License, Version 2.0 (the 010 * "License"); you may not use this file except in compliance 011 * with the License. You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, 016 * software distributed under the License is distributed on an 017 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 018 * KIND, either express or implied. See the License for the 019 * specific language governing permissions and limitations 020 * under the License. 021 */ 022 023 024 025 026 027 /** 028 * An interface for objects that can be pooled and recycled several times 029 * by different clients. Pooled objects that implement this interface 030 * use no argument ctor and recycle methods. Initialization is taken 031 * care of using the init method. This is a way to avoid 032 * introspection/reflection when pooling an object. 033 * 034 * @author <a href="mailto:jmcnally@collab.net">John McNally</a> 035 * @version $Id: InitableRecyclable.java 535465 2007-05-05 06:58:06Z tv $ 036 */ 037 public interface InitableRecyclable extends Recyclable 038 { 039 /** 040 * This method should be called after retrieving the object from 041 * the pool. 042 */ 043 public void init(Object initObj) throws PoolException; 044 }