public class InstanceHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.apache.tomcat.InstanceManager |
getClassLoaderInstanceManager(ClassLoader classLoader)
Get the
instance manager for a given
instance, stored within the
. |
static org.apache.tomcat.InstanceManager |
getServletInstanceManager(javax.servlet.ServletConfig servletConfig)
Get the
instance manager for a given
. |
static void |
postConstruct(org.apache.tomcat.InstanceManager instanceManager,
Object instance)
Post-construct an instance of the specified
using
the provided . |
static void |
preDestroy(org.apache.tomcat.InstanceManager instanceManager,
Object instance)
Pre-destroy an instance
previously post-constructed
with the provided . |
protected static void |
setClassLoaderInstanceManager(ClassLoader classLoader,
org.apache.tomcat.InstanceManager instanceManager)
Set the
instance manager for a given
instance, stored within the
. |
public static org.apache.tomcat.InstanceManager getServletInstanceManager(javax.servlet.ServletConfig servletConfig)
InstanceManager instance manager for a given
ServletConfig.
For any non-null servletConfig with a non-null ServletContext,
if no instance manager is defined, this method will produce a
SimpleInstanceManager and associate it with that
ServletConfig and its ClassLoader.servletConfig - public static org.apache.tomcat.InstanceManager getClassLoaderInstanceManager(ClassLoader classLoader)
InstanceManager instance manager for a given
ClassLoader instance, stored within the
InstanceHelper Map.
For any non-null classLoader, if no instance manager is defined,
this method will produce a SimpleInstanceManager
and associate it with that ClassLoader.classLoader - protected static void setClassLoaderInstanceManager(ClassLoader classLoader, org.apache.tomcat.InstanceManager instanceManager)
InstanceManager instance manager for a given
ClassLoader instance, stored within the
InstanceHelper Map.classLoader - instanceManager - public static void postConstruct(org.apache.tomcat.InstanceManager instanceManager,
Object instance)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
NamingException
Object using
the provided InstanceManager.
Note: This method replaces the old postContruct method in the AnnotationHelper.
Note: In Jasper, this calls naming resources injection as well.instanceManager - instance - IllegalAccessExceptionIllegalArgumentExceptionInvocationTargetExceptionNamingExceptionpublic static void preDestroy(org.apache.tomcat.InstanceManager instanceManager,
Object instance)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
Object previously post-constructed
with the provided InstanceManager.
Note: This method replaces the old preDestroy method in the AnnotationHelper.instanceManager - instance managerinstance - object instanceIllegalAccessExceptionIllegalArgumentExceptionInvocationTargetExceptionCopyright © 2000–2024 Apache Software Foundation. All rights reserved.