Class ServerEndpointConfig.Builder

java.lang.Object
jakarta.websocket.server.ServerEndpointConfig.Builder
Enclosing interface:
ServerEndpointConfig

public static final class ServerEndpointConfig.Builder extends Object
The ServerEndpointConfig.Builder is a class used for creating ServerEndpointConfig.Builder objects for the purposes of deploying a server endpoint.

Here are some examples:

Building a plain configuration for an endpoint with just a path.

 
 ServerEndpointConfig config = ServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class, "/foo").build();
 
 

Building a configuration with no subprotocols and a custom configurator.

 
 ServerEndpointConfig config = ServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class, "/bar")
         .subprotocols(subprotocols)
         .configurator(new MyServerConfigurator())
         .build();