Package org.jboss.weld.environment.jetty
Class WeldDecorator
- java.lang.Object
-
- org.jboss.weld.environment.jetty.WeldDecorator
-
- Direct Known Subclasses:
LegacyWeldDecorator
public class WeldDecorator extends Object
Jetty Eclipse Weld support for jetty >=9.4.20This Decorator has no hard dependencies on Jetty APIs, rather it relies on the server to be configured so that an object set as the "org.eclipse.jetty.cdi.decorator" is introspected for methods that match the
decorate(Object)anddestroy(Object)signatures, which are then invoked dynamically.- Author:
- Greg Wilkins
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWeldDecorator(javax.servlet.ServletContext servletContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tdecorate(T o)Decorate an object.voiddestroy(Object o)Destroy a decorated object.
-
-
-
Method Detail
-
decorate
public <T> T decorate(T o)
Decorate an object.The signature of this method must match what is introspected for by the Jetty DecoratingListener class. It is invoked dynamically.
- Type Parameters:
T- The type of the object to be decorated- Parameters:
o- The object to be decorated- Returns:
- The decorated object
-
destroy
public void destroy(Object o)
Destroy a decorated object.The signature of this method must match what is introspected for by the Jetty DecoratingListener class. It is invoked dynamically.
- Parameters:
o- The object to be destroyed
-
-