Class Response

    • Constructor Summary

      Constructors 
      Constructor Description
      Response​(long requestId)
      Creates a successful response containing no information
      Response​(long requestId, java.lang.String textMessage)
      Creates a successful response containing a textual message
      Response​(long requestId, java.lang.String textMessage, boolean success)
      Creates a response containing a textual message
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      long getRequestId()  
      java.lang.String getTextMessage()
      Returns the text message of this response or null if there is none
      int hashCode()  
      boolean isSuccess()
      Returns whether this response encodes a success or a failure
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Response

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

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

        public Response​(long requestId,
                        java.lang.String textMessage,
                        boolean success)
        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
    • Method Detail

      • getTextMessage

        public java.lang.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
      • getRequestId

        public long getRequestId()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object