public class Tomcat7AnnotationLifecycleProvider extends Object implements DiscoverableLifecycleProvider, LifecycleProvider2
Constructor and Description |
---|
Tomcat7AnnotationLifecycleProvider(ExternalContext externalContext) |
Modifier and Type | Method and Description |
---|---|
void |
destroyInstance(Object instance)
Take whatever steps are needed to shut down the object, including calling a preDestroy method.
|
boolean |
isAvailable() |
Object |
newInstance(String className)
Create an object of the class with the supplied name, inject dependencies as appropriate,
and call a postContruct method as appropriate.
|
void |
postConstruct(Object instance)
Call a postConstruct method as appropriate.
|
public Tomcat7AnnotationLifecycleProvider(ExternalContext externalContext)
public Object newInstance(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NamingException, InvocationTargetException
LifecycleProvider
newInstance
in interface LifecycleProvider
newInstance
in interface LifecycleProvider2
className
- name of the class of the desired objectClassNotFoundException
IllegalAccessException
InstantiationException
NamingException
InvocationTargetException
public void destroyInstance(Object instance) throws IllegalAccessException, InvocationTargetException
LifecycleProvider
destroyInstance
in interface LifecycleProvider
instance
- object to shut down.IllegalAccessException
InvocationTargetException
public void postConstruct(Object instance) throws IllegalAccessException, InvocationTargetException
LifecycleProvider2
postConstruct
in interface LifecycleProvider2
instance
- object to initializeIllegalAccessException
InvocationTargetException
public boolean isAvailable()
isAvailable
in interface DiscoverableLifecycleProvider
Copyright © 2020 The Apache Software Foundation. All rights reserved.