| |
|
| java.lang.Object org.codehaus.dna.impl.ContainerUtil
ContainerUtil | public class ContainerUtil (Code) | | Utility class to make it easier to process a object
through its lifecycle stages.
version: $Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $ |
Method Summary | |
public static void | compose(Object object, ResourceLocator locator) Supply specified object with ResourceLocator if it implements the
Composable interface.
Parameters: object - the object to process Parameters: locator - the ResourceLocator. | public static void | configure(Object object, Configuration configuration) Supply specified object with Configuration if it implements the
Configurable interface.
Parameters: object - the object to process Parameters: configuration - the Configuration. | public static void | dispose(Object object) Dispose specified object if it implements the
Active interface. | public static void | enableLogging(Object object, Logger logger) Supply specified object with Logger if it implements the
LogEnabled interface.
Parameters: object - the object to process Parameters: logger - the logger. | public static void | initialize(Object object) Initialize specified object if it implements the
Active interface. |
compose | public static void compose(Object object, ResourceLocator locator) throws MissingResourceException(Code) | | Supply specified object with ResourceLocator if it implements the
Composable interface.
Parameters: object - the object to process Parameters: locator - the ResourceLocator. If null then the specifiedobject must not implement Composable. throws: IllegalArgumentException - if the object is Composableand locator is null throws: MissingResourceException - if processing lifecycle stage onobject throws exception |
configure | public static void configure(Object object, Configuration configuration) throws ConfigurationException(Code) | | Supply specified object with Configuration if it implements the
Configurable interface.
Parameters: object - the object to process Parameters: configuration - the Configuration. If null then the specifiedobject must not implement Configurable. throws: IllegalArgumentException - if the object is Configurableand configuration is null throws: ConfigurationException - if processing lifecycle stage onobject throws exception |
dispose | public static void dispose(Object object) throws Exception(Code) | | Dispose specified object if it implements the
Active interface.
Parameters: object - the object to process throws: Exception - if processing lifecycle stage onobject throws exception |
enableLogging | public static void enableLogging(Object object, Logger logger)(Code) | | Supply specified object with Logger if it implements the
LogEnabled interface.
Parameters: object - the object to process Parameters: logger - the logger. If null then the specified object mustnot implement LogEnabled. throws: IllegalArgumentException - if the object is LogEnabled andLogger is null |
initialize | public static void initialize(Object object) throws Exception(Code) | | Initialize specified object if it implements the
Active interface.
Parameters: object - the object to process throws: Exception - if processing lifecycle stage onobject throws exception |
|
|
|