Class RegistrationResult


  • public final class RegistrationResult
    extends RequestResponseResult<io.vertx.core.json.JsonObject>
    A container for the result returned by Hono's registration API.
    • Method Detail

      • from

        public static RegistrationResult from​(int status)
        Creates a new result for a status code.
        Parameters:
        status - The status code.
        Returns:
        The result.
      • from

        public static RegistrationResult from​(int status,
                                              io.vertx.core.json.JsonObject payload)
        Creates a new result for a status code and a payload.
        Parameters:
        status - The status code.
        payload - The payload to include in the result.
        Returns:
        The result.
      • from

        public static RegistrationResult from​(int status,
                                              String payload)
        Creates a new result for a status code and a payload.
        Parameters:
        status - The status code.
        payload - The string representation of the JSON payload to include in the result (may be null).
        Returns:
        The result.
        Throws:
        io.vertx.core.json.DecodeException - if the given payload is not valid JSON.
      • from

        public static RegistrationResult from​(int status,
                                              io.vertx.core.json.JsonObject payload,
                                              CacheDirective cacheDirective)
        Creates a new result for a status code and a payload.
        Parameters:
        status - The status code.
        payload - The payload to include in the result.
        cacheDirective - Restrictions regarding the caching of the payload.
        Returns:
        The result.
      • from

        public static RegistrationResult from​(int status,
                                              io.vertx.core.json.JsonObject payload,
                                              CacheDirective cacheDirective,
                                              org.apache.qpid.proton.amqp.messaging.ApplicationProperties applicationProperties)
        Creates a new result for a status code and a payload.
        Parameters:
        status - The status code.
        payload - The payload to include in the result.
        cacheDirective - Restrictions regarding the caching of the payload.
        applicationProperties - Arbitrary properties conveyed in the response message's application-properties.
        Returns:
        The result.