public class DecoratingListener
extends java.lang.Object
implements javax.servlet.ServletContextAttributeListener
Decorator or reflected for decorator compatible methods
so it can be added to the ServletContextHandler.getObjectFactory() as a
Decorator.| Modifier and Type | Class and Description |
|---|---|
private static class |
DecoratingListener.DynamicDecorator |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
_attributeName |
private ServletContextHandler |
_context |
private Decorator |
_decorator |
private static java.lang.invoke.MethodType |
DECORATE_TYPE |
private static java.lang.invoke.MethodType |
DESTROY_TYPE |
| Constructor and Description |
|---|
DecoratingListener(ServletContextHandler context,
java.lang.String attributeName) |
| Modifier and Type | Method and Description |
|---|---|
private Decorator |
asDecorator(java.lang.Object object) |
void |
attributeAdded(javax.servlet.ServletContextAttributeEvent event) |
void |
attributeRemoved(javax.servlet.ServletContextAttributeEvent event) |
void |
attributeReplaced(javax.servlet.ServletContextAttributeEvent event) |
java.lang.String |
getAttributeName() |
javax.servlet.ServletContext |
getServletContext() |
private static final java.lang.invoke.MethodType DECORATE_TYPE
private static final java.lang.invoke.MethodType DESTROY_TYPE
private final ServletContextHandler _context
private final java.lang.String _attributeName
private Decorator _decorator
public DecoratingListener(ServletContextHandler context, java.lang.String attributeName)
public java.lang.String getAttributeName()
public javax.servlet.ServletContext getServletContext()
private Decorator asDecorator(java.lang.Object object)
public void attributeAdded(javax.servlet.ServletContextAttributeEvent event)
attributeAdded in interface javax.servlet.ServletContextAttributeListenerpublic void attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
attributeRemoved in interface javax.servlet.ServletContextAttributeListenerpublic void attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
attributeReplaced in interface javax.servlet.ServletContextAttributeListener