Class CalibrationSocket
- java.lang.Object
-
- org.palladiosimulator.protocom.framework.java.ee.api.sockets.WebSocket
-
- org.palladiosimulator.protocom.framework.java.ee.api.sockets.CalibrationSocket
-
public class CalibrationSocket extends WebSocket
WebSocket class for providing real-time calibration updates.
-
-
Constructor Summary
Constructors Constructor Description CalibrationSocket()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onClose(javax.websocket.Session session, javax.websocket.CloseReason reason)
Called when a socket is closed.void
onError(javax.websocket.Session session, Throwable t)
Called when an error occurred.void
onMessage(String message, javax.websocket.Session session)
Called when a message is received.void
onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
Called when a socket is opened.static void
update(int progress, String message)
Sends a progress update in all sessions.
-
-
-
Method Detail
-
update
public static void update(int progress, String message)
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
public void onMessage(String message, javax.websocket.Session session)
Called when a message is received.- Parameters:
message
- the messagesession
- the session of the socket
-
onError
public void onError(javax.websocket.Session session, Throwable t)
Called when an error occurred.- Parameters:
session
- the session of the sockett
- a description of the error
-
-