Skip to content

Commit f7304f7

Browse files
committed
Update spec doc in light of discussion
1 parent 2ce96b1 commit f7304f7

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

spec/src/main/asciidoc/WebSocket.adoc

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,15 @@ order in which extensions are presented in the opening handshake must be
600600
maintained as the order determines the order in which the extensions will
601601
process 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

608613
The client may include the same extension multiple times. This signifies that
609614
different 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
873878
share state across all instances of the endpoint in addition to
874879
customizing 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
933948
the 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

Comments
 (0)