1 /***************************************************************************** 2 * Copyright (C) Codehaus.org. All rights reserved. * 3 * ------------------------------------------------------------------------- * 4 * The software in this package is published under the terms of the BSD * 5 * style license a copy of which has been included with this distribution in * 6 * the LICENSE.txt file. * 7 *****************************************************************************/ 8 /* 9 * Created on Mar 15, 2005 10 * 11 * Author Ben Yu 12 * ZBS 13 */ 14 package jfun.yan; 15 16 /** 17 * Registrar is a mutable ComponentMap. 18 * It handles registration and unregistration of components. 19 * <p> 20 * Codehaus.org. 21 * 22 * @author Ben Yu 23 * 24 */ 25 public interface Registrar extends ComponentMap{ 26 /** 27 * Register a Component identified by a key. 28 * @param key the component key. 29 * @param cc the component. 30 */ 31 void registerComponent(Object key, Component cc); 32 /** 33 * Unregister a component identified by a key. 34 * @param key the component key. 35 */ 36 void unregisterComponent(Object key); 37 /** 38 * Unregister components of a certain type. 39 * @param type the component instance type. 40 */ 41 void unregisterComponentsOfType(Class type); 42 /** 43 * Verifies that all the registered components can be satisfied. 44 * @param cmap the ComponentMap from which 45 * the parts of the registered components are obtained. 46 */ 47 void verify(ComponentMap cmap); 48 49 } 50