org.apache.myfaces.config.annotation
Class TomcatAnnotationLifecycleProvider

java.lang.Object
  extended by org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
All Implemented Interfaces:
DiscoverableLifecycleProvider, LifecycleProvider, LifecycleProvider2

public class TomcatAnnotationLifecycleProvider
extends java.lang.Object
implements DiscoverableLifecycleProvider, LifecycleProvider2


Constructor Summary
TomcatAnnotationLifecycleProvider(ExternalContext externalContext)
           
 
Method Summary
 void destroyInstance(java.lang.Object o)
          Take whatever steps are needed to shut down the object, including calling a preDestroy method.
 boolean isAvailable()
           
 java.lang.Object newInstance(java.lang.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(java.lang.Object o)
          Call a postConstruct method as appropriate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomcatAnnotationLifecycleProvider

public TomcatAnnotationLifecycleProvider(ExternalContext externalContext)
Method Detail

newInstance

public java.lang.Object newInstance(java.lang.String className)
                             throws java.lang.InstantiationException,
                                    java.lang.IllegalAccessException,
                                    java.lang.reflect.InvocationTargetException,
                                    javax.naming.NamingException,
                                    java.lang.ClassNotFoundException
Description copied from interface: LifecycleProvider
Create an object of the class with the supplied name, inject dependencies as appropriate, and call a postContruct method as appropriate.

Specified by:
newInstance in interface LifecycleProvider
Specified by:
newInstance in interface LifecycleProvider2
Parameters:
className - name of the class of the desired object
Returns:
a fully constructed, dependency-injected, and initialized object.
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException
java.lang.ClassNotFoundException

destroyInstance

public void destroyInstance(java.lang.Object o)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException
Description copied from interface: LifecycleProvider
Take whatever steps are needed to shut down the object, including calling a preDestroy method.

Specified by:
destroyInstance in interface LifecycleProvider
Parameters:
o - object to shut down.
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

isAvailable

public boolean isAvailable()
Specified by:
isAvailable in interface DiscoverableLifecycleProvider

postConstruct

public void postConstruct(java.lang.Object o)
                   throws java.lang.IllegalAccessException,
                          java.lang.reflect.InvocationTargetException
Description copied from interface: LifecycleProvider2
Call a postConstruct method as appropriate.

Specified by:
postConstruct in interface LifecycleProvider2
Parameters:
o - object to initialize
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.