@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { /** * 支持websocket 的 connection */ registry.addHandler(binaryGeometryTemplateSocketHandler,"/ws/binarygeometry/template").setAllowedOrigins("*").addInterceptors(new BinaryGeometryTemplateInterceptor()); /** * 如不支持websocket的connenction,采用sockjs */ registry.addHandler(geometrySocketHandler,"/ws/geometry").setAllowedOrigins("*").addInterceptors(new GeometryInterceptor()); //.withSockJS(); registry.addHandler(streamGeometrySocketHandler,"/ws/streamgeometry").setAllowedOrigins("*").addInterceptors(new StreamGeometryInterceptor()); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { WebSocketPolicy policy = new WebSocketPolicy(WebSocketBehavior.SERVER); policy.setMaxTextMessageBufferSize(MAX_MSG_SIZE); policy.setMaxTextMessageSize(MAX_MSG_SIZE); policy.setIdleTimeout(IDLE_TIMEOUT); OcppWebSocketUpgrader upgradeStrategy = new OcppWebSocketUpgrader( policy, ocpp12WebSocketEndpoint, ocpp15WebSocketEndpoint, chargePointRepository); DefaultHandshakeHandler handler = new DefaultHandshakeHandler(upgradeStrategy); handler.setSupportedProtocols(PROTOCOLS); registry.addHandler(ocpp12WebSocketEndpoint, "/websocket/CentralSystemService/*") .addHandler(ocpp15WebSocketEndpoint, "/websocket/CentralSystemService/*") .setHandshakeHandler(handler) .setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry .addHandler(notificationHandler(), "/teapots") .addHandler(teapotHandler(), "/teapots/register/{teapotId}") .addHandler(consoleHandler(), "/teapots/{teapotId}") .setAllowedOrigins("*") // allow all origins .addInterceptors(new UriTemplateHandshakeInterceptor()); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { WebSocketPolicy policy = new WebSocketPolicy(WebSocketBehavior.SERVER); policy.setMaxTextMessageBufferSize(MAX_MSG_SIZE); policy.setMaxTextMessageSize(MAX_MSG_SIZE); policy.setIdleTimeout(IDLE_TIMEOUT); OcppWebSocketUpgrader upgradeStrategy = new OcppWebSocketUpgrader( policy, ocpp12WebSocketEndpoint, ocpp15WebSocketEndpoint, chargePointRepository, notificationService); DefaultHandshakeHandler handler = new DefaultHandshakeHandler(upgradeStrategy); handler.setSupportedProtocols(PROTOCOLS); registry.addHandler(ocpp12WebSocketEndpoint, "/websocket/CentralSystemService/*") .addHandler(ocpp15WebSocketEndpoint, "/websocket/CentralSystemService/*") .setHandshakeHandler(handler) .setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { if (AppConfig.isNonInteractive) { return; } registry.addHandler(new WebSocketHandler(), "/ws").withSockJS() .setClientLibraryUrl("https://cdn.jsdelivr.net/sockjs/1.1.4/sockjs.min.js"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(myHandler(), "/ws") .addInterceptors(new HandshakeInterceptor()); registry.addHandler(myHandler(), "/ws/sockjs") .addInterceptors(new HandshakeInterceptor()).withSockJS(); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { String[] beans = context.getBeanNamesForAnnotation(WSHandler.class); for (String bean : beans) { WebSocketHandler handler = context.getBean(bean, WebSocketHandler.class); String[] path = handler.getClass().getAnnotation(WSHandler.class).value(); registry.addHandler(handler, path).setAllowedOrigins("*").withSockJS(); LOGGER.info("[WebSocket]注册 WebSocket path {} 到 {}", path, bean); } }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { MessageRouter jsonMessageRouter = this.jsonMessageRouter(); registry.addHandler(jsonMessageRouter, "/ws") .addInterceptors(httpSessionHandshakeInterceptor()) .setAllowedOrigins("*"); jsonMessageRouter.addHandler(serverMessageHandler()); }
@Override protected void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { CommandWebSocketMessageDispatcher dispatcher = new CommandWebSocketMessageDispatcher(); dispatcher.setProcessorContainer(commandProcessorContainer); dispatcher.setUserTokenManager(userTokenManager); dispatcher.setWebSocketSessionListeners(webSocketSessionListeners); dispatcher.setTokenParsers(webSocketTokenParsers); registry.addHandler(dispatcher, "/sockjs") .setAllowedOrigins(allowedOrigins) .withSockJS() .setSessionCookieNeeded(true); registry.addHandler(dispatcher, "/socket") .setAllowedOrigins(allowedOrigins); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry .addHandler(spectateWebSocketHandler(), "/ws/spectate") .withSockJS() .setInterceptors(spectateHandshakeInterceptor()); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(echoWebSocketHandler(), "/echo").setAllowedOrigins("*") .withSockJS(); registry.addHandler(snakeWebSocketHandler(), "/snake").setAllowedOrigins("*") .withSockJS(); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(echoWebSocketHandler(), "/echo").setAllowedOrigins("*").withSockJS(); registry.addHandler(greetingWebSocketHandler(), "/hello").setAllowedOrigins("*").withSockJS(); registry.addHandler(closeWithCodeWebSocketHandler(), "/code").setAllowedOrigins("*").withSockJS(); registry.addHandler(randomByteStreamWebSocketHandler(), "/stream").setAllowedOrigins("*").withSockJS(); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { //@formatter:off registry .addHandler(clearHandler, clrPath) .addHandler(encHandler, encPath) .addInterceptors(new HttpSessionHandshakeInterceptor()) .setHandshakeHandler(createHandshakeHandler()); //@formatter:on }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { final String[] allowedOriginArray = getAllowedOriginArray(configProperties.getWebSocketAllowedOrigins()); for (PinpointWebSocketHandler handler : handlerRepository.getWebSocketHandlerRepository()) { String path = handler.getRequestMapping() + WEBSOCKET_SUFFIX; final WebSocketHandlerRegistration webSocketHandlerRegistration = registry.addHandler(handler, path); webSocketHandlerRegistration.addInterceptors(new HttpSessionHandshakeInterceptor()); webSocketHandlerRegistration.addInterceptors(new WebSocketSessionContextPrepareHandshakeInterceptor()); webSocketHandlerRegistration.setAllowedOrigins(allowedOriginArray); } }
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(new HotlineSocketHandler(), "/data"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(groupCallHandler(), "/groupcall"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(callHandler(), "/call").setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(websocketCuotaHandler, "/websocket/cuotas") .setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(webSocketHandler, "/api/ws").setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(new WebSocketHandler(), "/web-socket") .setAllowedOrigins("*"); }
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(new JavametricsSpringSocketHandler(), "javametrics-dash/javametrics-socket"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { logger.debug("register websocket handlers: {}", registry); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(slotMoveHandle, "/slot_move"); registry.addHandler(redisInstallHandle, "/install"); registry.addHandler(createClusterHandle, "/create"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry .addHandler(terminalSocket(), "/terminal"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { WebSocketHandler webSocketHandler = cmdLoggingConsumer(); registry.addHandler(webSocketHandler, URL_FOR_AGENT_CMD_LOGGING).setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(progressHandle(), "/ws/onProgress"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(redisTextWebSocketHandler,"/ws/redis") .addHandler(mysqlTextWebSocketHandler,"/ws/mysql"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(myHandler(), "/myHandler_sockjs").setAllowedOrigins("*").withSockJS(); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(myHandler(), "/myHandler").setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(myHandler(), "/vapi").setAllowedOrigins("*"); registry.addHandler(browser(), "/browser").setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(new WebSocketProxyServerHandler(), "/"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry .addHandler(emailWebSocketHandler, emailWebSocketRoute.getPath()) .setAllowedOrigins("*"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { // 允许连接的域,只能以http或https开头 String[] allowsOrigins = {"http://127.0.0.1:1213", "http://localhost:1213"}; registry.addHandler(gameHandler(),"/game").addInterceptors(handshakeInterceptor()).setAllowedOrigins(allowsOrigins); }
@Override public void registerWebSocketHandlers(final WebSocketHandlerRegistry registry) { registry.addHandler(handler, "/commands"); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { this.handshakeHandler.setSupportedProtocols("foo", "bar", "baz"); registry.addHandler(handler(), "/ws").setHandshakeHandler(this.handshakeHandler); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { HandshakeHandler handshakeHandler = new DefaultHandshakeHandler(this.upgradeStrategy); registry.addHandler(new EchoHandler(), "/echo").setHandshakeHandler(handshakeHandler).withSockJS(); registry.addHandler(testServerHandler(), "/test").setHandshakeHandler(handshakeHandler).withSockJS(); }
@Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(chatHandler, "/chat"); }