Package com.aspectran.websocket.jsr356
Class ServerEndpointExporter
- java.lang.Object
-
- com.aspectran.websocket.jsr356.ServerEndpointExporter
-
public class ServerEndpointExporter extends java.lang.ObjectDetects beans of typeServerEndpointConfigand registers with the standard Java WebSocket runtime. Also detects beans annotated withServerEndpointand registers them as well. Although not required, it is likely annotated endpoints should have theirconfiguratorproperty set toAspectranConfigurator.Created: 29/09/2019
-
-
Constructor Summary
Constructors Constructor Description ServerEndpointExporter(ActivityContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.websocket.server.ServerContainergetServerContainer()Return the JSR-356ServerContainerto use for endpoint registration.booleanhasServerContainer()voidregisterEndpoints()Actually register the endpoints.voidsetAnnotatedEndpointClasses(java.lang.Class<?>... annotatedEndpointClasses)Explicitly list annotated endpoint types that should be registered on startup.voidsetServerContainer(jakarta.servlet.ServletContext servletContext)voidsetServerContainer(jakarta.websocket.server.ServerContainer serverContainer)Set the JSR-356ServerContainerto use for endpoint registration.
-
-
-
Constructor Detail
-
ServerEndpointExporter
public ServerEndpointExporter(ActivityContext context)
-
-
Method Detail
-
getServerContainer
@Nullable public jakarta.websocket.server.ServerContainer getServerContainer()
Return the JSR-356ServerContainerto use for endpoint registration.
-
hasServerContainer
public boolean hasServerContainer()
-
setServerContainer
public void setServerContainer(@Nullable jakarta.websocket.server.ServerContainer serverContainer)
Set the JSR-356ServerContainerto use for endpoint registration. If not set, the container is going to be retrieved via theServletContext.
-
setServerContainer
public void setServerContainer(jakarta.servlet.ServletContext servletContext)
-
setAnnotatedEndpointClasses
public void setAnnotatedEndpointClasses(java.lang.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, and rely on Spring configuration instead.- Parameters:
annotatedEndpointClasses-ServerEndpoint-annotated types
-
registerEndpoints
public void registerEndpoints()
Actually register the endpoints.
-
-