Class Response


  • public class Response
    extends Object
    This class represents a response to a OpenWebNet request sent to the gateway. Can contain multiple messages (frames), last message should be an ACK/NACK.
    Author:
    M. Valla - Initial contribution
    • Constructor Detail

      • Response

        public Response​(OpenMessage request)
        Creates a Response object associated to the request message
        Parameters:
        request - the OpenMessage request message
    • Method Detail

      • getRequest

        public OpenMessage getRequest()
        Returns the initial request message
        Returns:
        the initial request message
      • isSuccess

        public boolean isSuccess()
        Returns true if the request was successful (the last OpenMessages in the response is an ACK)
        Returns:
        true if the request was successful
      • getFinalResponse

        public OpenMessage getFinalResponse()
        Returns the last OpenMessage that has finalised this response
        Returns:
        the last OpenMessage
      • addResponse

        protected void addResponse​(OpenMessage msg)
        Add a new message received as response
        Parameters:
        msg - the new message to add
      • hasFinalResponse

        protected boolean hasFinalResponse()
        Returns true if an ACK/NACK has been received
        Returns:
        true if an ACK/NACK has been received
      • waitResponse

        protected void waitResponse()
      • responseReady

        protected void responseReady()