Interface EventStreamJsonMessage

    • Method Detail

      • toPayload

        default byte[] toPayload​(com.google.gson.Gson gson)
        Serialize this object into a JSON payload. Does not validate object being serialized WARNING: implementers should not override this method. This could be an abstract class with final implementations for serialization/deserialization. Or better yet, rework how it works
        Parameters:
        gson - The GSON to convert to a JSON payload
        Returns:
        The GSON converted to a JSON payload
      • fromJson

        default EventStreamJsonMessage fromJson​(com.google.gson.Gson gson,
                                                byte[] payload)
        Converts the given GSON and payload into a EventStreamJsonMessage
        Parameters:
        gson - The GSON to convert
        payload - The payload to convert
        Returns:
        A EventStreamJsonMessage
      • postFromJson

        default void postFromJson()
        If anything needs to be done in memory after parsing from JSON, override and perform it here
      • getApplicationModelType

        String getApplicationModelType()
        Returns the named model type. May be used for a header.
        Returns:
        the named model type
      • isVoid

        default boolean isVoid()
        Returns whether the EventStreamJsonMessage is void
        Returns:
        True if the EventStreamJsonMessage is void