1 /* 2 * Copyright 2003-2004 The Apache Software Foundation 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 * implied. 13 * 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.avalon.lifecycle; 18 19 import org.apache.avalon.framework.context.Context; 20 21 /** 22 * The <code>Accessor</code> interface describes the access and release 23 * stages that occur between a service or component manager and a container 24 * during service deployment. Lifecycle extensions supporting access 25 * and release stages must implement this interface. 26 * 27 * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a> 28 * @version CVS $Revision: 1.3 $ $Date: 2004/02/28 11:47:19 $ 29 */ 30 public interface Accessor 31 { 32 /** 33 * Access stage handler. 34 * 35 * @param object the object that is being accessed 36 * @param context the context instance required by the access handler 37 * implementation 38 * @exception Exception if an error occurs 39 */ 40 void access( Object object, Context context ) 41 throws Exception; 42 43 /** 44 * Release stage handler. 45 * 46 * @param object the object that is being released 47 * @param context the context instance required by the release handler 48 * implementation 49 */ 50 void release( Object object, Context context ); 51 52 } 53