Class RegistrationResult

java.lang.Object
org.eclipse.hono.util.RequestResponseResult<io.vertx.core.json.JsonObject>
org.eclipse.hono.util.RegistrationResult

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

    • from

      public static RegistrationResult from(int status)
      Creates a new result for a status code.
      Parameters:
      status - The code indicating the outcome of processing the request.
      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 code indicating the outcome of processing the request.
      payload - The payload contained in the response message or null, if the response does not contain any payload data.
      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 code indicating the outcome of processing the request.
      payload - The payload contained in the response message or null, if the response does not contain any payload data.
      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 code indicating the outcome of processing the request.
      payload - The payload contained in the response message or null, if the response does not contain any payload data.
      cacheDirective - Restrictions regarding the caching of the payload by the receiver of the result or null if no restrictions apply.
      Returns:
      The result.
    • from

      public static RegistrationResult from(int status, io.vertx.core.json.JsonObject payload, CacheDirective cacheDirective, Map<String,Object> responseProperties)
      Creates a new result for a status code and a payload.
      Parameters:
      status - The code indicating the outcome of processing the request.
      payload - The payload contained in the response message or null, if the response does not contain any payload data.
      cacheDirective - Restrictions regarding the caching of the payload by the receiver of the result or null if no restrictions apply.
      responseProperties - Arbitrary additional properties conveyed in the response message or null, if the response does not contain additional properties.
      Returns:
      The result.