org.springframework.web.reactive.socket.server.WebSocketService Java Examples

The following examples show how to use org.springframework.web.reactive.socket.server.WebSocketService. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebsocketRoutingFilter.java    From spring-cloud-gateway with Apache License 2.0 5 votes vote down vote up
public WebsocketRoutingFilter(WebSocketClient webSocketClient,
		WebSocketService webSocketService,
		ObjectProvider<List<HttpHeadersFilter>> headersFiltersProvider) {
	this.webSocketClient = webSocketClient;
	this.webSocketService = webSocketService;
	this.headersFiltersProvider = headersFiltersProvider;
}
 
Example #2
Source File: GatewayAutoConfiguration.java    From spring-cloud-gateway with Apache License 2.0 5 votes vote down vote up
@Bean
public WebsocketRoutingFilter websocketRoutingFilter(WebSocketClient webSocketClient,
		WebSocketService webSocketService,
		ObjectProvider<List<HttpHeadersFilter>> headersFilters) {
	return new WebsocketRoutingFilter(webSocketClient, webSocketService,
			headersFilters);
}
 
Example #3
Source File: WebSocketHandlerAdapter.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * Return the configured {@code WebSocketService} to handle requests.
 */
public WebSocketService getWebSocketService() {
	return this.webSocketService;
}
 
Example #4
Source File: Application.java    From spring-reactive-playground with Apache License 2.0 4 votes vote down vote up
@Bean
public WebSocketService webSocketService() {
	return new HandshakeWebSocketService(new ReactorNettyRequestUpgradeStrategy());
}
 
Example #5
Source File: WebSocketIntegrationTests.java    From spring-cloud-gateway with Apache License 2.0 4 votes vote down vote up
@Bean
public WebSocketService webSocketService() {
	return new HandshakeWebSocketService(getUpgradeStrategy());
}
 
Example #6
Source File: GatewayAutoConfiguration.java    From spring-cloud-gateway with Apache License 2.0 4 votes vote down vote up
@Bean
public WebSocketService webSocketService(
		RequestUpgradeStrategy requestUpgradeStrategy) {
	return new HandshakeWebSocketService(requestUpgradeStrategy);
}
 
Example #7
Source File: ReactiveChatSocketConfig.java    From Spring-5.0-Cookbook with MIT License 4 votes vote down vote up
@Bean
public WebSocketService webSocketService() {
	return new HandshakeWebSocketService(new ReactorNettyRequestUpgradeStrategy());
}
 
Example #8
Source File: WebSocketRouter.java    From webFluxTemplate with MIT License 4 votes vote down vote up
@Bean
public WebSocketService webSocketService() {
    return new HandshakeWebSocketService(new ReactorNettyRequestUpgradeStrategy());
}
 
Example #9
Source File: ServerAutoConfiguration.java    From vertx-spring-boot with Apache License 2.0 4 votes vote down vote up
@Bean
public WebSocketHandlerAdapter webSocketHandlerAdapter(WebSocketService webSocketService) {
    return new WebSocketHandlerAdapter(webSocketService);
}
 
Example #10
Source File: ServerAutoConfiguration.java    From vertx-spring-boot with Apache License 2.0 4 votes vote down vote up
@Bean
public WebSocketService webSocketService() {
    VertxRequestUpgradeStrategy requestUpgradeStrategy = new VertxRequestUpgradeStrategy();
    return new HandshakeWebSocketService(requestUpgradeStrategy);
}
 
Example #11
Source File: AbstractWebSocketIntegrationTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Bean
public WebSocketService webSocketService() {
	return new HandshakeWebSocketService(getUpgradeStrategy());
}
 
Example #12
Source File: WebSocketHandlerAdapter.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * Return the configured {@code WebSocketService} to handle requests.
 */
public WebSocketService getWebSocketService() {
	return this.webSocketService;
}
 
Example #13
Source File: WebSocketHandlerAdapter.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * Alternative constructor with the {@link WebSocketService} to use.
 */
public WebSocketHandlerAdapter(WebSocketService webSocketService) {
	Assert.notNull(webSocketService, "'webSocketService' is required");
	this.webSocketService = webSocketService;
}
 
Example #14
Source File: AbstractWebSocketIntegrationTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Bean
public WebSocketService webSocketService() {
	return new HandshakeWebSocketService(getUpgradeStrategy());
}
 
Example #15
Source File: WebSocketHandlerAdapter.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * Alternative constructor with the {@link WebSocketService} to use.
 */
public WebSocketHandlerAdapter(WebSocketService webSocketService) {
	Assert.notNull(webSocketService, "'webSocketService' is required");
	this.webSocketService = webSocketService;
}
 
Example #16
Source File: WebSocketPlugin.java    From soul with Apache License 2.0 2 votes vote down vote up
/**
 * Instantiates a new Web socket plugin.
 *
 * @param webSocketClient  the web socket client
 * @param webSocketService the web socket service
 */
public WebSocketPlugin(final WebSocketClient webSocketClient, final WebSocketService webSocketService) {
    this.webSocketClient = webSocketClient;
    this.webSocketService = webSocketService;
}
 
Example #17
Source File: DividePluginConfiguration.java    From soul with Apache License 2.0 2 votes vote down vote up
/**
 * Web socket plugin web socket plugin.
 *
 * @param webSocketClient  the web socket client
 * @param webSocketService the web socket service
 * @return the web socket plugin
 */
@Bean
public WebSocketPlugin webSocketPlugin(final WebSocketClient webSocketClient, final WebSocketService webSocketService) {
    return new WebSocketPlugin(webSocketClient, webSocketService);
}
 
Example #18
Source File: DividePluginConfiguration.java    From soul with Apache License 2.0 2 votes vote down vote up
/**
 * Web socket service web socket service.
 *
 * @return the web socket service
 */
@Bean
public WebSocketService webSocketService() {
    return new HandshakeWebSocketService();
}