Package org.eclipse.hono.util
Class RegistrationResult
java.lang.Object
org.eclipse.hono.util.RequestResponseResult<io.vertx.core.json.JsonObject>
org.eclipse.hono.util.RegistrationResult
A container for the result returned by Hono's registration API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RegistrationResult
from
(int status) Creates a new result for a status code.static RegistrationResult
from
(int status, io.vertx.core.json.JsonObject payload) Creates a new result for a status code and a payload.static RegistrationResult
from
(int status, io.vertx.core.json.JsonObject payload, CacheDirective cacheDirective) Creates a new result for a status code and a payload.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.static RegistrationResult
Creates a new result for a status code and a payload.Methods inherited from class org.eclipse.hono.util.RequestResponseResult
getCacheDirective, getPayload, getResponseProperties, getStatus, isError, isNotFound, isOk
-
Method Details
-
from
Creates a new result for a status code.- Parameters:
status
- The code indicating the outcome of processing the request.- Returns:
- The result.
-
from
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 ornull
, if the response does not contain any payload data.- Returns:
- The result.
-
from
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 ornull
, 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 ornull
, if the response does not contain any payload data.cacheDirective
- Restrictions regarding the caching of the payload by the receiver of the result ornull
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 ornull
, if the response does not contain any payload data.cacheDirective
- Restrictions regarding the caching of the payload by the receiver of the result ornull
if no restrictions apply.responseProperties
- Arbitrary additional properties conveyed in the response message ornull
, if the response does not contain additional properties.- Returns:
- The result.
-