# Annotation Interface ClientEndpoint

@Retention(RUNTIME) @Target(TYPE) public @interface ClientEndpoint
Annotates a class as a WebSocket client endpoint. The annotation provides configuration information about the endpoint such as subprotocols, encoders, decoders, and configurator.

## Optional Element Summary

Optional Elements
Modifier and Type
Optional Element
Description
`Class<? extends ClientEndpointConfig.Configurator>`
`configurator`
The configurator class used to customize the WebSocket handshake.
`Class<? extends Decoder>[]`
`decoders`
The decoder classes that this client endpoint uses.
`Class<? extends Encoder>[]`
`encoders`
The encoder classes that this client endpoint uses.
`String[]`
`subprotocols`
The sub-protocols that this client endpoint supports, in order of preference.

## Element Details

### subprotocols

String[] subprotocols
The sub-protocols that this client endpoint supports, in order of preference.

Returns:
  The list of preferred sub-protocols

Default:
  `{}`

### decoders

Class<? extends Decoder>[] decoders
The decoder classes that this client endpoint uses.

Returns:
  The list of decoder classes

Default:
  `{}`

### encoders

Class<? extends Encoder>[] encoders
The encoder classes that this client endpoint uses.

Returns:
  The list of encoder classes

Default:
  `{}`

### configurator

Class<? extends ClientEndpointConfig.Configurator> configurator
The configurator class used to customize the WebSocket handshake.

Returns:
  The configurator class

Default:
  `jakarta.websocket.ClientEndpointConfig.Configurator.class`