public void addEndpoint(Class<?> clazz) {
ServerEndpoint anno = clazz.getAnnotation(ServerEndpoint.class);
if(anno == null){
throw new RuntimeException(clazz.getCanonicalName()+" does not have a "+ServerEndpoint.class.getCanonicalName()+" annotation");
}
ServerEndpointConfig.Builder bldr = ServerEndpointConfig.Builder.create(clazz, anno.value());
if(defaultConfigurator != null){
bldr = bldr.configurator(defaultConfigurator);
}
endpointConfigs.add(bldr.build());
if (starting)
throw new RuntimeException("can't add endpoint after starting lifecycle");
}
WebsocketBundle.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:dropwizard-websockets
作者:
评论列表
文章目录