@WebListener public class WebActorInitializer extends Object implements ServletContextListener
Registers WebActors annotated with the WebActor
annotation. Scan classes of the servletContext classLoader for WebActor annotated classes You can set a userClassLoader with
Constructor and Description |
---|
WebActorInitializer() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(ServletContextEvent sce)
Receives notification that the ServletContext is about to be
shut down.
|
void |
contextInitialized(ServletContextEvent sce)
Receives notification that the web application initialization
process is starting.
|
static void |
registerWebActor(ServletContext sc,
Class<?> webActorClass) |
static Class<? extends WebActorInitializer> |
setUserClassLoader(ClassLoader userClassLoader) |
public static Class<? extends WebActorInitializer> setUserClassLoader(ClassLoader userClassLoader)
userClassLoader
- Scan classes of this classLoader WebActor annotated classespublic final void contextInitialized(ServletContextEvent sce)
javax.servlet.ServletContextListener
All ServletContextListeners are notified of context initialization before any filters or servlets in the web application are initialized.
contextInitialized
in interface ServletContextListener
sce
- the ServletContextEvent containing the ServletContext
that is being initializedpublic static void registerWebActor(ServletContext sc, Class<?> webActorClass)
public final void contextDestroyed(ServletContextEvent sce)
javax.servlet.ServletContextListener
All servlets and filters will have been destroyed before any ServletContextListeners are notified of context destruction.
contextDestroyed
in interface ServletContextListener
sce
- the ServletContextEvent containing the ServletContext
that is being destroyed