Class Notification

java.lang.Object
com.cumulocity.sdk.client.notification2.Notification

public class Notification extends Object
Represents data packet received from Notifications 2.0 through WebSocket. The packet is always either just a payload line or multiple lines. In case of multiple lines, first line is always an ACK header and last line is a payload. All lines between are additional headers.
  • Constructor Details

    • Notification

      public Notification()
  • Method Details

    • parseJson

      public <T> T parseJson(Class<T> clazz)
      Uses JSONBase.getJSONParser() to parse payload to expected object type
      Type Parameters:
      T - expected type param
      Parameters:
      clazz - expected type
      Returns:
      parsed object
    • parse

      public static Notification parse(String message)