Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active December 31, 2015 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/7ddb8e592a21cdb565a9 to your computer and use it in GitHub Desktop.
Save abhirockzz/7ddb8e592a21cdb565a9 to your computer and use it in GitHub Desktop.
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