/** * Gets the operation to invoke. * * @return The operation of {@code null} if this is a response message. */ public String getOperation() { return getProperty(MessageHelper.SYS_PROPERTY_SUBJECT); }
/** * Gets the operation to invoke. * * @return The operation of {@code null} if this is a response message. */ public String getOperation() { return getProperty(MessageHelper.SYS_PROPERTY_SUBJECT); }
/** * Gets the status code indicating the outcome of the invocation * of the operation. * * @return The status code or {@code null} if this is a request message. */ public Integer getStatus() { return getProperty(MessageHelper.APP_PROPERTY_STATUS); }
/** * Gets the value of the payload property. * * @return The value or {@code null} if not set. */ public JsonObject getJsonPayload() { return getProperty(RequestResponseApiConstants.FIELD_PAYLOAD); }
/** * Gets the value of the cache directive property. * * @return The value or {@code null} if not set. */ public String getCacheDirective() { return getProperty(MessageHelper.APP_PROPERTY_CACHE_CONTROL); }
/** * Gets the value of the cache directive property. * * @return The value or {@code null} if not set. */ public String getCacheDirective() { return getProperty(MessageHelper.APP_PROPERTY_CACHE_CONTROL); }
/** * Gets the value of the tenant identifier property. * * @return The value or {@code null} if not set. */ public String getTenant() { return getProperty(MessageHelper.APP_PROPERTY_TENANT_ID); }
/** * Gets the status code indicating the outcome of the invocation * of the operation. * * @return The status code or {@code null} if this is a request message. */ public Integer getStatus() { return getProperty(MessageHelper.APP_PROPERTY_STATUS); }
/** * Gets the value of the tenant identifier property. * * @return The value or {@code null} if not set. */ public String getTenant() { return getProperty(MessageHelper.APP_PROPERTY_TENANT_ID); }
/** * Gets the value of the device identifier property. * * @return The value or {@code null} if not set. */ public String getDeviceId() { return getProperty(MessageHelper.APP_PROPERTY_DEVICE_ID); }
/** * Gets the value of the reply-to address property. * * @return The value or {@code null} if not set. */ public String getReplyToAddress() { return getProperty(MessageHelper.SYS_PROPERTY_REPLY_TO); }
/** * Gets the value of the device identifier property. * * @return The value or {@code null} if not set. */ public String getDeviceId() { return getProperty(MessageHelper.APP_PROPERTY_DEVICE_ID); }
/** * Gets the value of the gateway identifier property. * * @return The value or {@code null} if not set. */ public String getGatewayId() { return getProperty(MessageHelper.APP_PROPERTY_GATEWAY_ID); }
/** * Gets the value of the reply-to address property. * * @return The value or {@code null} if not set. */ public String getReplyToAddress() { return getProperty(MessageHelper.SYS_PROPERTY_REPLY_TO); }
/** * Gets the value of the <em>x-opt-app-correlation-id</em> flag. * * @return The value or {@code false} if not set. */ public boolean isAppCorrelationId() { final Boolean result = getProperty(MessageHelper.ANNOTATION_X_OPT_APP_CORRELATION_ID); return Optional.ofNullable(result).orElse(Boolean.FALSE); }
/** * Gets the value of the payload property. * * @param defaultValue The default value. * @return The value of the payload property or the given default * value if not set. */ public JsonObject getJsonPayload(final JsonObject defaultValue) { final JsonObject payload = getProperty(RequestResponseApiConstants.FIELD_PAYLOAD); return Optional.ofNullable(payload).orElse(defaultValue); }
/** * Gets the value of the payload property. * * @param defaultValue The default value. * @return The value of the payload property or the given default * value if not set. */ public JsonObject getJsonPayload(final JsonObject defaultValue) { final JsonObject payload = getProperty(RequestResponseApiConstants.FIELD_PAYLOAD); return Optional.ofNullable(payload).orElse(defaultValue); }
/** * Gets the value of the <em>x-opt-app-correlation-id</em> flag. * * @return The value or {@code false} if not set. */ public boolean isAppCorrelationId() { final Boolean result = getProperty(MessageHelper.ANNOTATION_X_OPT_APP_CORRELATION_ID); return Optional.ofNullable(result).orElse(Boolean.FALSE); }
/** * Checks if this (response) message has all properties required * for successful delivery to the client. * * @return {@code true} if this message has {@code non-null} values for * properties <em>operation</em>, <em>replyToAddress</em> and * <em>correlationId</em>. */ public boolean hasResponseProperties() { return getOperation() != null && getReplyToAddress() != null && getProperty(MessageHelper.SYS_PROPERTY_CORRELATION_ID) != null; }
/** * Checks if this (response) message has all properties required * for successful delivery to the client. * * @return {@code true} if this message has {@code non-null} values for * properties <em>operation</em>, <em>replyToAddress</em> and * <em>correlationId</em>. */ public boolean hasResponseProperties() { return getOperation() != null && getReplyToAddress() != null && getProperty(MessageHelper.SYS_PROPERTY_CORRELATION_ID) != null; }