I try to use JLink and Java program for receiving responses from the abstract WebSocket server. WSS not supported by Wolfram Language now, but I can use this java project + JLink for the creating a WebSocket client - simple example of the client here. In Wolfram Language I use this client as following:
Get["JLink`"];
ReinstallJava[ClassPath -> <classpath>, CommandLine -> <commandline>];
client = JavaNew["ExampleClient", JavaNew["java.net.URI", "wss://host:8888/stream"]];
client@connect[];
After this in Java console window printing messages from the server. Messages handling in the method onMessage(String message). How can I change the class ExampleClient and method onMessage for the saving result in a DataStructure that created in Wolfram Language?
Dependensies in my environment for the standalone using:
Java ~17 (Default OpenJDK in Wolfram/System Files/Java not supported)
hamcrest-core-1.3.jar
Java-WebSocket-1.5.2.jar
json-20211205.jar
junit-4.12.jar
slf4j-api-1.7.25.jar
All jar-files I got from maven repository