This manages the LifeCycle of jakarta. instances that are created with
jakarta., if this code is being run from another ServletContainer, or if run inside a
Jetty Server with the WebSocket client classes provided by the webapp.
This mechanism will not work if run with embedded Jetty or if the WebSocket client classes are provided by the server.
In this case then the client jakarta. will register itself to be automatically shutdown
with the Jetty ContextHandler.
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | contextDestroyed(ServletContextEvent
the ServletContextEvent containing the ServletContext that is being destroyed sce)Overrides default jakarta. Receives notification that the ServletContext is about to be shut down. |
| public void | contextInitialized(ServletContextEvent
the ServletContextEvent containing the ServletContext that is being initialized sce)Overrides default jakarta. Receives notification that the web application initialization process is starting. |
| public void | onStartup(Set<Class<?>>
the Set of application classes that extend, implement, or have been annotated with the class types specified
by the c, ServletContext HandlesTypes annotation, or null if there are no
matches, or this ServletContainerInitializer has not been annotated with HandlesTypesthe ServletContext of the web application that is being started and in which the classes
contained in c were found ctx)Implements jakarta. Notifies this ServletContainerInitializer of the startup of the application represented by the given ServletContext. |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| JakartaWebSocketShutdownContainer | back to summary |
|---|---|
| public JakartaWebSocketShutdownContainer() | |
| contextDestroyed | back to summary |
|---|---|
| public void contextDestroyed(ServletContextEvent sce) Overrides default jakarta. Doc from jakarta. Receives notification that the ServletContext is about to be shut down. All servlets and filters will have been destroyed before any ServletContextListeners are notified of context destruction.
| |
| contextInitialized | back to summary |
|---|---|
| public void contextInitialized(ServletContextEvent sce) Overrides default jakarta. Doc from jakarta. Receives notification that the web application initialization process is starting. All ServletContextListeners are notified of context initialization before any filters or servlets in the web application are initialized.
| |
| onStartup | back to summary |
|---|---|
| public void onStartup(Set<Class<?>> c, ServletContext ctx) throws ServletException Implements jakarta. Doc from jakarta. Notifies this ServletContainerInitializer of the startup of the application represented by the given ServletContext. If this ServletContainerInitializer is bundled in a JAR file inside the WEB-INF/lib directory of an application, its onStartup method will be invoked only once during the startup of the bundling application. If this ServletContainerInitializer is bundled inside a JAR file outside of any WEB-INF/lib directory, but still discoverable as described above, its onStartup method will be invoked every time an application is started.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |