Class DecoratingListener

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.ServletContextAttributeListener
    Direct Known Subclasses:
    CdiDecoratingListener, DecoratingListener

    public class DecoratingListener
    extends java.lang.Object
    implements javax.servlet.ServletContextAttributeListener
    A ServletContextAttributeListener that listens for a context attribute to obtain a decorator instance. The instance is then either coerced to a Decorator or reflected for decorator compatible methods so it can be added to the ServletContextHandler.getObjectFactory() as a Decorator.
    • Constructor Detail

      • DecoratingListener

        public DecoratingListener​(ServletContextHandler context,
                                  java.lang.String attributeName)
    • Method Detail

      • getAttributeName

        public java.lang.String getAttributeName()
      • getServletContext

        public javax.servlet.ServletContext getServletContext()
      • attributeAdded

        public void attributeAdded​(javax.servlet.ServletContextAttributeEvent event)
        Specified by:
        attributeAdded in interface javax.servlet.ServletContextAttributeListener
      • attributeRemoved

        public void attributeRemoved​(javax.servlet.ServletContextAttributeEvent event)
        Specified by:
        attributeRemoved in interface javax.servlet.ServletContextAttributeListener
      • attributeReplaced

        public void attributeReplaced​(javax.servlet.ServletContextAttributeEvent event)
        Specified by:
        attributeReplaced in interface javax.servlet.ServletContextAttributeListener