ServerEndpoint (WebSocket 2.1 API Documentation - Apache Tomcat 10.1.48)
Description: declaration: package: jakarta.websocket.server, annotation type: ServerEndpoint

# Annotation Type ServerEndpoint

@Retention(RUNTIME) @Target(TYPE) public @interface ServerEndpoint

- ## Required Element Summary

  Required Elements
  Modifier and Type
  Required Element
  Description
  `String`
  `value`
  URI or URI-template that the annotated class should be mapped to.

- ## Optional Element Summary

  Optional Elements
  Modifier and Type
  Optional Element
  Description
  `Class<? extends ServerEndpointConfig.Configurator>`
  `configurator`
  `Class<? extends Decoder>[]`
  `decoders`
  `Class<? extends Encoder>[]`
  `encoders`
  `String[]`
  `subprotocols`

- ## Element Details

  - ### value

    String value
    URI 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[] subprotocols
    Default:
      `{}`

  - ### decoders

    Class<? extends Decoder>[] decoders
    Default:
      `{}`

  - ### encoders

    Class<? extends Encoder>[] encoders
    Default:
      `{}`

  - ### configurator

    Class<? extends ServerEndpointConfig.Configurator> configurator
    Default:
      `jakarta.websocket.server.ServerEndpointConfig.Configurator.class`