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
     
  • Method Summary

    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.

    Methods inherited from class org.palladiosimulator.protocom.framework.java.ee.api.sockets.WebSocket

    send, sendToAll

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CalibrationSocket

      public CalibrationSocket()
  • Method Details

    • 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 socket
      config - 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 socket
      reason - the close reason
    • onMessage

      public void onMessage(String message, javax.websocket.Session session)
      Called when a message is received.
      Parameters:
      message - the message
      session - 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 socket
      t - a description of the error