org.apache.myfaces.config.annotation
Class Tomcat7AnnotationLifecycleProvider

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

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

An annotation lifecycle provider for Tomcat 7.


Constructor Summary
Tomcat7AnnotationLifecycleProvider(javax.faces.context.ExternalContext externalContext)
           
 
Method Summary
 void destroyInstance(java.lang.Object instance)
          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 instance)
          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

Tomcat7AnnotationLifecycleProvider

public Tomcat7AnnotationLifecycleProvider(javax.faces.context.ExternalContext externalContext)
Method Detail

newInstance

public java.lang.Object newInstance(java.lang.String className)
                             throws java.lang.ClassNotFoundException,
                                    java.lang.IllegalAccessException,
                                    java.lang.InstantiationException,
                                    javax.naming.NamingException,
                                    java.lang.reflect.InvocationTargetException
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.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
javax.naming.NamingException
java.lang.reflect.InvocationTargetException

destroyInstance

public void destroyInstance(java.lang.Object instance)
                     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:
instance - object to shut down.
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

postConstruct

public void postConstruct(java.lang.Object instance)
                   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:
instance - object to initialize
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

isAvailable

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


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