public abstract class LifecycleUtils extends Object
Initializable.init() and
Destroyable.destroy() methods cleanly on any object.| Constructor and Description |
|---|
LifecycleUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
destroy(Collection c)
Calls
destroy for each object in the collection. |
static void |
destroy(Destroyable d) |
static void |
destroy(Object o) |
static void |
init(Collection c)
Calls
init for each object in the collection. |
static void |
init(Initializable initializable) |
static void |
init(Object o) |
public static void init(Object o) throws ShiroException
ShiroExceptionpublic static void init(Initializable initializable) throws ShiroException
ShiroExceptionpublic static void init(Collection c) throws ShiroException
init for each object in the collection. If the collection is null or empty,
this method returns quietly.c - the collection containing objects to init.ShiroException - if unable to initialize one or more instances.public static void destroy(Object o)
public static void destroy(Destroyable d)
public static void destroy(Collection c)
destroy for each object in the collection.
If the collection is null or empty, this method returns quietly.c - the collection of objects to destroy.Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.