Javax Websocket, WebSocket protocol, ws://*** and wss://***

Javax Websocket

provided within javax.websocket package, including:

"@ServerEndpoint: If decorated with @ServerEndpoint, the container ensures availability of the class as a WebSocket server listening to a specific URI space
@ClientEndpoint: A class decorated with this annotation is treated as a WebSocket client
@OnOpen: A Java method with @OnOpen is invoked by the container when a new WebSocket connection is initiated
@OnMessage: A Java method, annotated with @OnMessage, receives the information from the WebSocket container when a message is sent to the endpoint
@OnError: A method with @OnError is invoked when there is a problem with the communication
@OnClose: Used to decorate a Java method that is called by the container when the WebSocket connection closes ..."
See more at https://www.baeldung.com/java-websockets

Websocket Protocol

WebSocket is distinct from HTTP. Both protocols are located at layer 7 in the OSI model and depend on TCP at layer 4.
RFC 6455 states that WebSocket "is designed to work over HTTP ports 80 and 443 as well as to support HTTP proxies and intermediaries," thus making it compatible with the HTTP protocol.
Unlike HTTP, WebSocket provides full-duplex communication. Additionally, WebSocket enables streams of messages on top of TCP.
The WebSocket protocol enables interaction between a web browser (or other client application) and a web server with lower overhead than half-duplex alternatives such as HTTP polling, facilitating real-time data transfer from and to the server. This is made possible by providing a standardized way for the server to send content to the client without being first requested by the client, and allowing messages to be passed back and forth while keeping the connection open.
The WebSocket protocol specification defines ws (WebSocket) and wss (WebSocket Secure) as two new uniform resource identifier (URI) schemes[4] that are used for unencrypted and encrypted connections, respectively.

More info: https://en.wikipedia.org/wiki/WebSocket