tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Dodunski" <>
Subject Re: Using custom Configurator with WebSockets
Date Wed, 24 Apr 2019 23:48:50 GMT
Thanks Mark, you've made it clear that annotating the interface is not an

Converting my server endpoint from annotation based to programmatic is not
a problem, nor is implementing ServerApplicationConfig to configure what
were previously @ServerEndpoint elements: value, encoders, decoders,

What is not clear is how this will solve the problem of Tomcat not
accepting an interface as an endpoint.  Afterall, the programmatic
approach still employs Configurator.getEndpointInstance(), and this is
where I came unstuck with annotations.

Below is the beginnings of my custom ServerApplicationConfig implementation.

public class CustomServerAppConfig implements ServerApplicationConfig {

    public Set<ServerEndpointConfig> getEndpointConfigs(Set<Class<?
extends Endpoint>> endpointClasses) {
        Set<ServerEndpointConfig> result = new HashSet<>();
        for (Class epClass : endpointClasses) {
            if (epClass.equals(MyEndpointInterface.class)) {
                ServerEndpointConfig sec =
        return result;

    public Set<Class<?>> getAnnotatedEndpointClasses(Set<Class<?>>
scanned) {
        return Collections.emptySet();



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message