|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.dna.impl.ContainerUtil
Utility class to make it easier to process a object through its lifecycle stages.
Constructor Summary | |
ContainerUtil()
|
Method Summary | |
static void |
compose(java.lang.Object object,
ResourceLocator locator)
Supply specified object with ResourceLocator if it implements the Composable interface. |
static void |
configure(java.lang.Object object,
Configuration configuration)
Supply specified object with Configuration if it implements the Configurable interface. |
static void |
dispose(java.lang.Object object)
Dispose specified object if it implements the Active interface. |
static void |
enableLogging(java.lang.Object object,
Logger logger)
Supply specified object with Logger if it implements the LogEnabled interface. |
static void |
initialize(java.lang.Object object)
Initialize specified object if it implements the Active interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ContainerUtil()
Method Detail |
public static void enableLogging(java.lang.Object object, Logger logger)
object
- the object to processlogger
- the logger. If null then the specified object must
not implement LogEnabled.
java.lang.IllegalArgumentException
- if the object is LogEnabled and
Logger is nullpublic static void compose(java.lang.Object object, ResourceLocator locator) throws MissingResourceException
object
- the object to processlocator
- the ResourceLocator. If null then the specified
object must not implement Composable.
java.lang.IllegalArgumentException
- if the object is Composable
and locator is null
MissingResourceException
- if processing lifecycle stage on
object throws exceptionpublic static void configure(java.lang.Object object, Configuration configuration) throws ConfigurationException
object
- the object to processconfiguration
- the Configuration. If null then the specified
object must not implement Configurable.
java.lang.IllegalArgumentException
- if the object is Configurable
and configuration is null
ConfigurationException
- if processing lifecycle stage on
object throws exceptionpublic static void initialize(java.lang.Object object) throws java.lang.Exception
object
- the object to process
java.lang.Exception
- if processing lifecycle stage on
object throws exceptionpublic static void dispose(java.lang.Object object) throws java.lang.Exception
object
- the object to process
java.lang.Exception
- if processing lifecycle stage on
object throws exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |