Custom deployment phase implementation (for programmatic endpoints in this case)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomServerAppConfigProvider implements ServerApplicationConfig { | |
@Override | |
public Set<ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends Endpoint>> endpointClasses) { | |
Set<ServerEndpointConfig> result = new HashSet<>(); | |
for (Class epClass : endpointClasses) { | |
//need to ignore Client endpoint class | |
if (epClass.equals(ProgrammaticChatEndpoint.class)) { | |
ServerEndpointConfig sec = ServerEndpointConfig.Builder.create(epClass, "/letschat").build(); | |
result.add(sec); | |
} | |
} | |
return result; | |
} | |
@Override | |
public Set<Class<?>> getAnnotatedEndpointClasses(Set<Class<?>> scanned) { | |
return Collections.emptySet(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment