jakarta.websocket.server.ServerEndpointConfig and registers
with the standard Jakarta WebSocket runtime. Also detects beans annotated with
ServerEndpoint and registers them as well. Although not required, it is likely
annotated endpoints should have their configurator property set to
SpringConfigurator.
When this class is used, by declaring it in Spring configuration, it should be
possible to turn off a Servlet container's scan for WebSocket endpoints. This can be
done with the help of the <absolute-ordering> element in web.xml.
ServerEndpointRegistration, SpringConfigurator, ServletServerContainerFactoryBean
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private ServerContainer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public void | afterSingletonsInstantiated()
Implements org. Invoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already. |
| protected ServerContainer | |
| protected void | initServletContext(ServletContext
the ServletContext that this application object runs in
(never servletContext)null)Overrides org. Subclasses may override this for custom initialization based on the ServletContext that this application object runs in. The default implementation is empty. |
| protected boolean | isContextRequired()
Overrides org. Overrides the base class behavior to enforce running in an ApplicationContext. |
| private void | |
| private void | |
| protected void | |
| public void | setAnnotatedEndpointClasses(Class<?>...
ServerEndpoint-annotated typesExplicitly list annotated endpoint types that should be registered on startup. |
| public void | setServerContainer(ServerContainer serverContainer)
Set the JSR-356 |
| annotatedEndpointClasses | back to summary |
|---|---|
| private List<Class<?>> annotatedEndpointClasses
| |
| serverContainer | back to summary |
|---|---|
| private ServerContainer serverContainer
| |
| ServerEndpointExporter | back to summary |
|---|---|
| public ServerEndpointExporter() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| afterSingletonsInstantiated | back to summary |
|---|---|
| public void afterSingletonsInstantiated() Implements org. Doc from org. Invoked right at the end of the singleton pre-instantiation phase,
with a guarantee that all regular singleton beans have been created
already. Note This callback won't be triggered for singleton beans
lazily initialized on demand after
| |
| getServerContainer | back to summary |
|---|---|
| protected ServerContainer getServerContainer() Return the JSR-356
| |
| initServletContext | back to summary |
|---|---|
| protected void initServletContext(ServletContext servletContext) Overrides org. Doc from org. Subclasses may override this for custom initialization based on the ServletContext that this application object runs in. The default implementation is empty. Called by
| |
| isContextRequired | back to summary |
|---|---|
| protected boolean isContextRequired() Overrides org. Doc from org. Overrides the base class behavior to enforce running in an ApplicationContext. All accessors will throw IllegalStateException if not running in a context.
| |
| registerEndpoint | back to summary |
|---|---|
| private void registerEndpoint(Class<?> endpointClass) | |
| registerEndpoint | back to summary |
|---|---|
| private void registerEndpoint(ServerEndpointConfig endpointConfig) | |
| registerEndpoints | back to summary |
|---|---|
| protected void registerEndpoints() Actually register the endpoints. Called by | |
| setAnnotatedEndpointClasses | back to summary |
|---|---|
| public void setAnnotatedEndpointClasses(Class<?>... annotatedEndpointClasses) Explicitly list annotated endpoint types that should be registered on startup. This can be done if you wish to turn off a Servlet container's scan for endpoints, which goes through all 3rd party jars in the classpath, and rely on Spring configuration instead.
| |
| setServerContainer | back to summary |
|---|---|
| public void setServerContainer(ServerContainer serverContainer) Set the JSR-356 | |