org.glassfish.jsp.api
Interface ResourceInjector


public interface ResourceInjector

Interface for injecting injectable resources into tag handler instances.

Author:
Jan Luehe

Method Summary
 void inject(JspTag handler)
          Injects the injectable resources from the component environment associated with this ResourceInjector into the given tag handler instance.
 void preDestroy(JspTag handler)
          Invokes any @PreDestroy methods defined on the instance's class (and super-classes).
 void setContext(javax.servlet.ServletContext servletContext)
          Associates this ResourceInjector with the component environment of the given servlet context.
 

Method Detail

setContext

void setContext(javax.servlet.ServletContext servletContext)
Associates this ResourceInjector with the component environment of the given servlet context.

Parameters:
servletContext - The servlet context

inject

void inject(JspTag handler)
            throws java.lang.Exception
Injects the injectable resources from the component environment associated with this ResourceInjector into the given tag handler instance.

Any @PostConstruct methods on the class (and super-classes) of the instance will be invoked after injection.

Parameters:
handler - The tag handler instance to be injected
Throws:
java.lang.Exception - if an error occurs during injection

preDestroy

void preDestroy(JspTag handler)
Invokes any @PreDestroy methods defined on the instance's class (and super-classes).

Parameters:
handler - The tag handler instance whose @PreDestroy methods to call


Copyright © 2009 GlassFish Community. All Rights Reserved.