Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javax WebSocket annotations not being used as default EndpointConfig #4407

Closed
lachlan-roberts opened this issue Dec 9, 2019 · 1 comment
Closed
Assignees

Comments

@lachlan-roberts
Copy link
Contributor

Jetty version
10.0.x

Description
When adding an annotated endpoint with javax websockets given a specific EndpointConfig, the annotation configuration should be used as the default and any settings set in the provided EndpointConfig should override these default values.

Example:

@ServerEndpoint(value = "/my/{end}/{point}", 
        subprotocols = "my", 
        encoders = MyStringEncoder.class, 
        configurator = MyConfigurator.class)
public static class MyEndpoint
{
...
}
...

ServerEndpointConfig endpointConfig = ServerEndpointConfig.Builder
                .create(MyEndpoint.class, "/{end}/my/{point}")
                .subprotocols(Arrays.asList("end"))
                .build();
container.addEndpoint(endpointConfig);

This should result in an endpoint being added with:
uriTemplate = "/{end}/my/{point} (from manual endpoint config)
subprotocols = [ "end" ] (from manual endpoint config)
encoders = [ MyStringEncoder class reference ] (from annotation)
configurator = MyConfigurator class reference (from annotation)

@lachlan-roberts lachlan-roberts self-assigned this Dec 9, 2019
lachlan-roberts added a commit that referenced this issue Dec 9, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Dec 13, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Dec 13, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Dec 13, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Dec 13, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@lachlan-roberts
Copy link
Contributor Author

fixed with #4420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant