Files
spring-integration-samples/basic/web-sockets
Spring Operator 4f48dce420 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were fixed successfully.

* http://www.apache.org/licenses/LICENSE-2.0.txt migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200).
* http://projects.spring.io/spring-integration migrated to:
  https://projects.spring.io/spring-integration ([https](https://projects.spring.io/spring-integration) result 301).
* http://repo.spring.io/libs-milestone migrated to:
  https://repo.spring.io/libs-milestone ([https](https://repo.spring.io/libs-milestone) result 302).
* http://repo.spring.io/libs-snapshot migrated to:
  https://repo.spring.io/libs-snapshot ([https](https://repo.spring.io/libs-snapshot) result 302).
* http://repo.spring.io/libs-staging-local migrated to:
  https://repo.spring.io/libs-staging-local ([https](https://repo.spring.io/libs-staging-local) result 302).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0
* http://maven.apache.org/xsd/maven-4.0.0.xsd
* http://www.w3.org/2001/XMLSchema-instance
2019-03-06 10:03:19 -05:00
..
2018-07-12 14:11:38 -04:00
2019-03-06 10:03:19 -05:00

WebSockets Sample

This example demonstrates the Standard WebSocket protocol (without any sub-protocols) with Spring Integration Adapters. It just sends current time from the server to all connected clients.

Server

The server is presented only with a single org.springframework.integration.samples.websocket.standard.server.Application class, which is based on the Spring Boot AutoConfiguration and Spring Integration Java & Annotation configuration. It is a main and starts an embedded Tomcat server on the default 8080 port. The WebSocket endpoint is mapped to the /time path.

The server also can be run from Gradle gradlew :web-sockets:run

Java Client

The org.springframework.integration.samples.websocket.standard.client.Application is a simple Java application, which starts an integration flow (client-context.xml), connects to the WebSocket server and prints Messages to the logs, which are received over WebSocket.

Browser Client

The index.html in the src/main/resources/static directory of this project demonstrates a JavaScript SockJS client, which connects to our server and just prints its messages in the middle of page.

Test Case

The org.springframework.integration.samples.websocket.standard.ApplicationTests demonstrates the Spring Boot test framework and starts Server & Client to check, that the client receives correct data.