Package org.apache.shiro.lang.util
Class LifecycleUtils
java.lang.Object
org.apache.shiro.lang.util.LifecycleUtils
Utility class to help call
Initializable.init() and
Destroyable.destroy() methods cleanly on any object.- Since:
- 0.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidCallsdestroyfor each object in the collection.static voidstatic voidstatic voidinit(Collection c) Callsinitfor each object in the collection.static voidinit(Initializable initializable)
-
Constructor Details
-
LifecycleUtils
public LifecycleUtils()
-
-
Method Details
-
init
- Throws:
ShiroException
-
init
- Throws:
ShiroException
-
init
Callsinitfor each object in the collection. If the collection isnullor empty, this method returns quietly.- Parameters:
c- the collection containing objects toinit.- Throws:
ShiroException- if unable to initialize one or more instances.- Since:
- 0.9
-
destroy
-
destroy
-
destroy
Callsdestroyfor each object in the collection. If the collection isnullor empty, this method returns quietly.- Parameters:
c- the collection of objects to destroy.- Since:
- 0.9
-