private ServerEndpointConfig createEndpointConfig(Class<?> endpointClass) throws DeploymentException {
ServerEndpoint annotation = endpointClass.getAnnotation(ServerEndpoint.class);
if (annotation == null) {
throw new InvalidWebSocketException("Unsupported WebSocket object, missing @" + ServerEndpoint.class + " annotation");
}
return ServerEndpointConfig.Builder.create(endpointClass, annotation.value())
.subprotocols(Arrays.asList(annotation.subprotocols()))
.decoders(Arrays.asList(annotation.decoders()))
.encoders(Arrays.asList(annotation.encoders()))
.configurator(configurator)
.build();
}
JettyServer.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:guice-websocket
作者:
评论列表
文章目录