Class Response

    • Constructor Detail

      • Response

        public Response​(long requestId)
        Creates a successful response containing no information
      • Response

        public Response​(long requestId,
                        String textMessage)
        Creates a successful response containing a textual message
        Parameters:
        textMessage - the message to encapsulate in the Response
      • Response

        @Deprecated(since="7")
        public Response​(long requestId,
                        String textMessage,
                        boolean success)
        Deprecated.
        Creates a response containing a textual message
        Parameters:
        textMessage - the message to encapsulate in the Response
        success - true if the response represents a successful call
      • Response

        public Response​(long requestId,
                        String textMessage,
                        Response.Outcome outcome)
        Creates a response containing a textual message
        Parameters:
        textMessage - the message to encapsulate in the Response
        outcome - the outcome of the operation
      • Response

        public Response​(long requestId,
                        String textMessage,
                        Response.Outcome outcome,
                        com.yahoo.messagebus.Trace trace)
        Creates a response containing a textual message
        Parameters:
        textMessage - the message to encapsulate in the Response
        outcome - the outcome of the operation
    • Method Detail

      • getTextMessage

        public String getTextMessage()
        Returns the text message of this response or null if there is none
        Returns:
        the message, or null
      • isSuccess

        public boolean isSuccess()
        Returns whether this response encodes a success or a failure
        Returns:
        true if success
      • outcome

        public Response.Outcome outcome()
        Returns the outcome of this operation.
      • getRequestId

        public long getRequestId()
      • getTrace

        public com.yahoo.messagebus.Trace getTrace()
        Returns the trace of this operation, or null if there is none.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object