Top Description Methods
com.sun.faces.spi

public Interface InjectionProvider

Known Direct Implementers
com.sun.faces.spi.InjectionProviderFactory.NoopInjectionProvider, com.sun.faces.vendor.WebContainerInjectionProvider, com.sun.faces.spi.DiscoverableInjectionProvider

This interface defines an integration point for Java EE vendors. Each vendor will need to provide an implementation of this interface which will provide the JSF implementation the necessary hooks to perform resource injection.

The implementation of this interface *must* be thread-safe and must provider either a no-arg constructor, or a constructor accepting a ServletContext instance.

Method Summary

Modifier and TypeMethod and Description
public void
inject(Object
the target managed bean
managedBean
)

The implementation of this method must perform the following steps:

  • Inject the supported resources per the Servlet 2.5 specification into the provided object
public void
invokePostConstruct(Object
the target managed bean
managedBean
)

The implemenation of this method must invoke any method marked with the @PostConstruct annotation (per the Common Annotations Specification).

public void
invokePreDestroy(Object
the target managed bean
managedBean
)

The implemenation of this method must invoke any method marked with the @PreDestroy annotation (per the Common Annotations Specification).

Method Detail

injectback to summary
public void inject(Object managedBean) throws InjectionProviderException

The implementation of this method must perform the following steps:

  • Inject the supported resources per the Servlet 2.5 specification into the provided object

This method must not invoke any methods annotated with @PostConstruct

Parameters
managedBean:Object

the target managed bean

Exceptions
InjectionProviderException:
if an error occurs during resource injection
invokePostConstructback to summary
public void invokePostConstruct(Object managedBean) throws InjectionProviderException

The implemenation of this method must invoke any method marked with the @PostConstruct annotation (per the Common Annotations Specification).

Parameters
managedBean:Object

the target managed bean

Exceptions
InjectionProviderException:
if an error occurs when invoking the method annotated by the @PostConstruct annotation
invokePreDestroyback to summary
public void invokePreDestroy(Object managedBean) throws InjectionProviderException

The implemenation of this method must invoke any method marked with the @PreDestroy annotation (per the Common Annotations Specification).

Parameters
managedBean:Object

the target managed bean

Exceptions
InjectionProviderException:
if an error occurs when invoking the method annotated by the @PreDestroy annotation