Package org.eclipse.hono.util
Class RegistrationAssertion
java.lang.Object
org.eclipse.hono.util.RegistrationAssertion
Encapsulates the registration assertion information for a device as defined by the
Device Registration API.
-
Constructor Summary
ConstructorDescriptionRegistrationAssertion
(String deviceId) Creates a new registration assertion for a device. -
Method Summary
Modifier and TypeMethodDescriptionGets the gateway devices that are authorized to act on behalf of the device.Gets the endpoint to use when sending commands.Gets default properties to be used for augmenting messages from the device with missing information.Gets the identifier of the asserted device.Gets the name of the downstream mapper definition to use for the device.Gets the name of the upstream mapper definition to use for the device.setAuthorizedGateways
(List<String> gatewayIds) Sets the gateway devices that are authorized to act on behalf of the device.setCommandEndpoint
(CommandEndpoint commandEndpoint) Sets the command endpoint to be used when sending commands.setDefaults
(Map<String, Object> defaults) Sets default properties to be used for augmenting messages from the device with missing information.setDownstreamMessageMapper
(String downstreamMessageMapper) Sets the name of the downstream mapper definition to use for the device.setUpstreamMessageMapper
(String upstreamMessageMapper) Sets the name of the upstream mapper definition to use for the device.
-
Constructor Details
-
RegistrationAssertion
Creates a new registration assertion for a device.- Parameters:
deviceId
- The identifier of the device.
-
-
Method Details
-
getDeviceId
Gets the identifier of the asserted device.- Returns:
- The identifier.
-
getAuthorizedGateways
Gets the gateway devices that are authorized to act on behalf of the device.- Returns:
- The gateway identifiers.
-
setAuthorizedGateways
Sets the gateway devices that are authorized to act on behalf of the device.- Parameters:
gatewayIds
- The gateway identifiers ornull
to clear the list.- Returns:
- A reference to this object for method chaining.
-
getDownstreamMessageMapper
Gets the name of the downstream mapper definition to use for the device.- Returns:
- The downstream mapper or
null
if not set.
-
setDownstreamMessageMapper
Sets the name of the downstream mapper definition to use for the device.- Parameters:
downstreamMessageMapper
- The mapper to set ornull
if no downstream mapper should be used.- Returns:
- A reference to this object for method chaining.
-
getUpstreamMessageMapper
Gets the name of the upstream mapper definition to use for the device.- Returns:
- The upstream mapper or
null
if not set.
-
setUpstreamMessageMapper
Sets the name of the upstream mapper definition to use for the device.- Parameters:
upstreamMessageMapper
- The upstream mapper to set ornull
if no upstream mapper should be used.- Returns:
- A reference to this object for method chaining.
-
getDefaults
Gets default properties to be used for augmenting messages from the device with missing information.- Returns:
- An unmodifiable view on the properties.
-
setDefaults
Sets default properties to be used for augmenting messages from the device with missing information.- Parameters:
defaults
- The properties to set ornull
to clear all properties.- Returns:
- A reference to this object for method chaining.
-
getCommandEndpoint
Gets the endpoint to use when sending commands.- Returns:
- The command endpoint or
null
if not set.
-
setCommandEndpoint
Sets the command endpoint to be used when sending commands.- Parameters:
commandEndpoint
- The command endpoint to set ornull
if no command endpoint is available.- Returns:
- A reference to this object for method chaining.
-