Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom deployment phase implementation (for programmatic endpoints in this case)
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