Annotation Interface ServerEndpoint
Annotates a class as a WebSocket server endpoint. The annotation provides configuration
information about the endpoint such as the URI path, subprotocols, encoders, decoders,
and configurator.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends ServerEndpointConfig.Configurator> The configurator class used to customize the WebSocket handshake.The decoder classes that this server endpoint uses.The encoder classes that this server endpoint uses.String[]The sub-protocols that this server endpoint supports.
-
Element Details
-
value
String valueURI or URI-template that the annotated class should be mapped to.- Returns:
- The URI or URI-template that the annotated class should be mapped to.
-
subprotocols
String[] subprotocolsThe sub-protocols that this server endpoint supports.- Returns:
- The list of supported sub-protocols
- Default:
{}
-
decoders
-
encoders
-
configurator
Class<? extends ServerEndpointConfig.Configurator> configuratorThe configurator class used to customize the WebSocket handshake.- Returns:
- The configurator class
- Default:
jakarta.websocket.server.ServerEndpointConfig.Configurator.class
-