Class CalibrationSocket
java.lang.Object
org.palladiosimulator.protocom.framework.java.ee.api.sockets.WebSocket
org.palladiosimulator.protocom.framework.java.ee.api.sockets.CalibrationSocket
WebSocket class for providing real-time calibration updates.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onClose
(javax.websocket.Session session, javax.websocket.CloseReason reason) Called when a socket is closed.void
Called when an error occurred.void
Called when a message is received.void
onOpen
(javax.websocket.Session session, javax.websocket.EndpointConfig config) Called when a socket is opened.static void
Sends a progress update in all sessions.
-
Constructor Details
-
CalibrationSocket
public CalibrationSocket()
-
-
Method Details
-
update
Sends a progress update in all sessions.- Parameters:
progress
- the new progress (0 to 100)message
- the message for the progress update
-
onOpen
public void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config) Called when a socket is opened.- Parameters:
session
- the session of the socketconfig
- the endpoint configuration
-
onClose
public void onClose(javax.websocket.Session session, javax.websocket.CloseReason reason) Called when a socket is closed.- Parameters:
session
- the session of the socketreason
- the close reason
-
onMessage
Called when a message is received.- Parameters:
message
- the messagesession
- the session of the socket
-
onError
Called when an error occurred.- Parameters:
session
- the session of the sockett
- a description of the error
-