jakarta.websocket.server.ServerEndpointConfig enhanced
to offer tyrus specific attributes like maxSessions.
Declarative way to define maxSessions is also available using
annotation MaxSessions.
MaxSessions
| Modifier and Type | Class and Description |
|---|---|
| public static class | TyrusServerEndpointConfig.
The TyrusServerEndpointConfig.Builder is a class used for creating
|
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: tne maximal number of open sessions.Returns configured maximal number of open sessions. |
| getMaxSessions | back to summary |
|---|---|
| public int getMaxSessions() Returns configured maximal number of open sessions.
| |
TyrusServerEndpointConfig.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 = TyrusServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class,
"/foo").build();
Building a configuration with no subprotocols, limited number of sessions (100) and a custom configurator.
ServerEndpointConfig config = TyrusServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class, "/bar")
.subprotocols(subprotocols)
.maxSessions(100)
.configurator(new MyServerConfigurator())
.build();
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private List | |
| private Class | |
| private List | |
| private int | |
| private String | |
| private ServerEndpointConfig. | |
| private List |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TyrusServerEndpointConfig | Returns: a new TyrusServerEndpointConfig object.Builds the configuration object using the current attributes that have been set on this builder object. |
| public TyrusServerEndpointConfig. | Returns: this builder instancethe configurator. serverEndpointConfiguratorSets the custom configurator to use on the configuration object built by this builder. |
| public static TyrusServerEndpointConfig. | Returns: a new instance of TyrusServerEndpointConfig.Builder .the class of the endpoint to configure endpointClass, String The URI or URI template where the endpoint will be deployed.
A trailing "/" will be ignored and the path must begin with /. path)Creates the builder with the mandatory information of the endpoint class (programmatic or annotated), the relative URI or URI-template to use, and with no subprotocols, extensions, encoders, decoders or custom configurator. |
| public TyrusServerEndpointConfig. | |
| public TyrusServerEndpointConfig. | |
| public TyrusServerEndpointConfig. | Returns: this builder instance.the extensions to use. extensions)Sets the extensions to use in the configuration. |
| public TyrusServerEndpointConfig. | Returns: this builder instance.maximal number of open session. maxSessions)Sets maximal number of open sessions. |
| public TyrusServerEndpointConfig. | Returns: this builder instance.the subprotocols. subprotocols)Sets the subprotocols to use in the configuration. |
| decoders | back to summary |
|---|---|
| private List<Class<? extends Decoder>> decoders | |
| encoders | back to summary |
|---|---|
| private List<Class<? extends Encoder>> encoders | |
| endpointClass | back to summary |
|---|---|
| private Class<?> endpointClass | |
| extensions | back to summary |
|---|---|
| private List<Extension> extensions | |
| maxSessions | back to summary |
|---|---|
| private int maxSessions | |
| path | back to summary |
|---|---|
| private String path | |
| serverEndpointConfigurator | back to summary |
|---|---|
| private ServerEndpointConfig. | |
| subprotocols | back to summary |
|---|---|
| private List<String> subprotocols | |
| Builder | back to summary |
|---|---|
| private Builder() | |
| Builder | back to summary |
|---|---|
| private Builder(Class<?> endpointClass, String path) | |
| build | back to summary |
|---|---|
| public TyrusServerEndpointConfig build() Builds the configuration object using the current attributes that have been set on this builder object.
| |
| configurator | back to summary |
|---|---|
| public TyrusServerEndpointConfig. Sets the custom configurator to use on the configuration object built by this builder.
| |
| create | back to summary |
|---|---|
| public static TyrusServerEndpointConfig. Creates the builder with the mandatory information of the endpoint class (programmatic or annotated), the relative URI or URI-template to use, and with no subprotocols, extensions, encoders, decoders or custom configurator.
| |
| decoders | back to summary |
|---|---|
| public TyrusServerEndpointConfig. Sets the decoder implementation classes to use in the configuration.
| |
| encoders | back to summary |
|---|---|
| public TyrusServerEndpointConfig. Sets the list of encoder implementation classes for this builder.
| |
| extensions | back to summary |
|---|---|
| public TyrusServerEndpointConfig. Sets the extensions to use in the configuration.
| |
| maxSessions | back to summary |
|---|---|
| public TyrusServerEndpointConfig. Sets maximal number of open sessions.
| |
| subprotocols | back to summary |
|---|---|
| public TyrusServerEndpointConfig. Sets the subprotocols to use in the configuration.
| |