@@ -600,10 +600,15 @@ order in which extensions are presented in the opening handshake must be
600600maintained as the order determines the order in which the extensions will
601601process WebSocket messages.
602602
603- Any extension whose name is not included in the list of extensions returned by
603+ Any extension whose name is returned from `ServerEndpointConfig.getExtensions()`
604+ where the name is prefixed with a `<`, must be excluded from the opening
605+ handshake response.
606+
607+ If `ServerContainer.getInstalledExtensions()` (excluding extensions with names
608+ prefaced with `<`) is a non-empty list, any extension whose name is not
609+ included in the list of extensions returned by
604610`ServerContainer.getInstalledExtensions()` must be excluded from the opening
605- handshake response. Implementation and configuration of supported extensions is
606- container specific.
611+ handshake response.
607612
608613The client may include the same extension multiple times. This signifies that
609614different configurations of the extension are acceptable with the variations
@@ -873,6 +878,16 @@ the endpoint [WSC-4.1.5-1]. The developer may use this technique to
873878share state across all instances of the endpoint in addition to
874879customizing the opening handshake.
875880
881+ ==== extensionConfigs
882+
883+ The optional extensionConfigs attribute allows the developer to indicate which
884+ WebSocket extensions this endpoint is prepared to accept if the extension is
885+ requested by the client and it is supported by the server container. If an
886+ extension name is prefaced with `<` that indicates that the extension must not
887+ be used regardless of whether the client requests it and/or the server container
888+ supports it. Listing the same extension with and without the `<` prefix is not
889+ valid and will trigger a `DeploymentException` on deployment.
890+
876891[[clientendpoint]]
877892=== @ClientEndpoint
878893
@@ -933,6 +948,17 @@ implementation must use this list in the opening handshake to negotiate
933948the desired subprotocol to use for the connection it establishes
934949[WSC-4.2.4-1].
935950
951+ ==== extensionConfigs
952+
953+ The optional extensionConfigs attribute allows the developer to indicate which
954+ WebSocket extensions this endpoint would like to request if the extension is
955+ supported by the client and server containers and permitted by the server
956+ endpoint. Extensions should be listed in the order they should be used. The same
957+ extension may appear multiple times with different configurations. Where an
958+ extension is listed with multiple configurations, the configurations must be
959+ provided in preference order. Extensions should be listed in preference order
960+ and the same extension may appear multiple times with different configurations.
961+
936962[[pathparam]]
937963=== @PathParam
938964
0 commit comments