org.apache.myfaces.config.annotation
Interface LifecycleProvider

All Known Subinterfaces:
DiscoverableLifecycleProvider, LifecycleProvider2
All Known Implementing Classes:
AllAnnotationLifecycleProvider, NoAnnotationLifecyleProvider, NoInjectionAnnotationLifecycleProvider, ResourceAnnotationLifecycleProvider, TomcatAnnotationLifecycleProvider

public interface LifecycleProvider

Proposed interface to annotation service. An implementation of this class needs to know the appropriate classloader, dependencies to be injected, and lifecycle methods to be called.

Version:
$Rev:$ $Date:$

Method Summary
 void destroyInstance(java.lang.Object o)
          Take whatever steps are needed to shut down the object, including calling a preDestroy method.
 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.
 

Method Detail

newInstance

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
Create an object of the class with the supplied name, inject dependencies as appropriate, and call a postContruct method as appropriate.

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

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

Parameters:
o - object to shut down.
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException


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