Package com.aspectran.web.socket.jsr356
Class ServerEndpointExporter
- java.lang.Object
-
- com.aspectran.web.socket.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(com.aspectran.core.context.ActivityContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.websocket.server.ServerContainergetServerContainer()Return the JSR-356ServerContainerto use for endpoint registration.voidinitServletContext(javax.servlet.ServletContext servletContext)voidregisterEndpoints()Actually register the endpoints.voidsetAnnotatedEndpointClasses(java.lang.Class<?>... annotatedEndpointClasses)Explicitly list annotated endpoint types that should be registered on startup.voidsetServerContainer(javax.websocket.server.ServerContainer serverContainer)Set the JSR-356ServerContainerto use for endpoint registration.
-
-
-
Method Detail
-
getServerContainer
@Nullable public javax.websocket.server.ServerContainer getServerContainer()
Return the JSR-356ServerContainerto use for endpoint registration.
-
setServerContainer
public void setServerContainer(@Nullable javax.websocket.server.ServerContainer serverContainer)Set the JSR-356ServerContainerto use for endpoint registration. If not set, the container is going to be retrieved via theServletContext.
-
initServletContext
public void initServletContext(javax.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.
-
-