Interface StatusCreate


  • public interface StatusCreate
    Interface for creating status.
    Author:
    mse
    • Method Detail

      • getStatusOK

        Status getStatusOK()
        Get OK status. Static instance should be returned.
        Returns:
        OK Status instance
      • createStatus

        Status createStatus​(Status.StatusType type,
                            String message,
                            Throwable cause)
        Create status.
        Parameters:
        type - status type, non-null
        message - message describing an error, non-null. NOTE: Do NOT use throwable.getMessage() as message, since it will be supplied with the cause.
        cause - exception that caused an error (optional)
        Returns:
        status instance.
      • deserializeStatus

        Status deserializeStatus​(ByteBuffer buffer,
                                 DeserializableControl control)
        Deserialize status. NOTE: use this method instead of Status.deserialize(), since this allows OK status optimization.
        Parameters:
        buffer - deserialization buffer
        control - deserialization control
        Returns:
        status instance