This J2SE console app communicates over WebSocket with an Echo service hosted by Kaazing WebSocket Gateway. The app sends messages and receives messages with the Echo service over WebSocket.
- Java 1.8
- Gradle 2.10 or higher
-
Install gradle: follow the steps here.
-
Build the application using gradle
cd <application root directory>
gradle installDist- Run the application
build/install/java-ws-demo/bin/java-ws-demoor
build\install\java-ws-demo\bin\java-ws-demo.bat
NOTE: The application can be run in the folowing ways:
- To connect to our defult URI:
/java-ws-demo
- To connect to your own local Kaazing Gateway URI (ex: ws://localhost:8000/echo):
/java-ws-demo '{YOUR.GATEWAY.URI}'
Note: If you encounter an exception, try running the program as the root user (sudo).
Documentation that explains how to create a Kaazing Java AMQP application from scratch to send and receive AMQP messages over WebSocket can be found here.
API Documentation for Kaazing Java AMQP Client library is available: