Class CommandResponse$


  • public class CommandResponse$
    extends java.lang.Object
    The nature of CommandResponse as an intermediate response of command execution or a final response which could be positive or negative
    • Field Detail

      • MODULE$

        public static final CommandResponse$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • CommandResponse$

        public CommandResponse$()
    • Method Detail

      • withRunId

        public CommandResponse.SubmitResponse withRunId​(Id id,
                                                        CommandResponse.SubmitResponse response)
        Transform a given CommandResponse to a response with the provided Id

        Parameters:
        id - the RunId for the new CommandResponse
        response - the CommandResponse to be transformed
        Returns:
        a CommandResponse that has runId as provided id
      • isFinal

        public boolean isFinal​(CommandResponse.QueryResponse qr)
        Tests a response to determine if it is a final command state

        Parameters:
        qr - response for testing
        Returns:
        true if it is final
      • isPositive

        public boolean isPositive​(CommandResponse.QueryResponse qr)
        Test a QueryResponse to determine if it is a positive response

        Parameters:
        qr - response for testing
        Returns:
        true if it is positive
      • isPositive

        public boolean isPositive​(CommandResponse.OnewayResponse or)
        Test a OnewayResponse to determine if it is a positive response

        Parameters:
        or - a OnewayResponse for testing
        Returns:
        true if positive, false otherwise
      • isNegative

        public boolean isNegative​(CommandResponse.QueryResponse qr)
        Tests a response to determine if it is a negative response

        Parameters:
        qr - response for testing
        Returns:
        true if it is negative
      • isIntermediate

        public boolean isIntermediate​(CommandResponse.QueryResponse qr)
        Tests a response to determine if it is an intermediate response

        Parameters:
        qr - response for testing
        Returns:
        returns true if it is intermediate