Class WebSocketException

  • All Implemented Interfaces:
    Serializable

    public class WebSocketException
    extends Exception
    When an exception occurred while handling an incoming web socket request. Used as a one-time response to a client request.
    See Also:
    Serialized Form
    • Constructor Detail

      • WebSocketException

        public WebSocketException​(int requestId,
                                  String message)
        Parameters:
        requestId - the client request id, if at least this could be successfully interpreted.
      • WebSocketException

        public WebSocketException​(int requestId,
                                  Throwable t)
      • WebSocketException

        public WebSocketException​(int requestId,
                                  String message,
                                  Throwable t)
    • Method Detail

      • getRequestId

        public int getRequestId()
      • attachData

        public void attachData​(String dataType,
                               com.google.protobuf.Message data)
      • getDataType

        public String getDataType()
      • getData

        public com.google.protobuf.Message getData()
      • toWebSocketExceptionData

        public org.yamcs.protobuf.WebSocketServerMessage.WebSocketExceptionData toWebSocketExceptionData()
                                                                                                  throws IOException
        Converts this exception to a protobuf message
        Throws:
        IOException