Package org.eclipse.hono.util
Class RegistrationAssertion
- java.lang.Object
-
- org.eclipse.hono.util.RegistrationAssertion
-
public final class RegistrationAssertion extends Object
Encapsulates the registration assertion information for a device as defined by the Device Registration API.
-
-
Constructor Summary
Constructors Constructor Description RegistrationAssertion(String deviceId)
Creates a new registration assertion for a device.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAuthorizedGateways()
Gets the gateway devices that are authorized to act on behalf of the device.Map<String,Object>
getDefaults()
Gets default properties to be used for augmenting messages from the device with missing information.String
getDeviceId()
Gets the identifier of the asserted device.String
getMapper()
Gets the name of the mapper definition to use for the device.RegistrationAssertion
setAuthorizedGateways(List<String> gatewayIds)
Sets the gateway devices that are authorized to act on behalf of the device.RegistrationAssertion
setDefaults(Map<String,Object> defaults)
Sets default properties to be used for augmenting messages from the device with missing information.RegistrationAssertion
setMapper(String mapper)
Sets the name of the mapper definition to use for the device.
-
-
-
Constructor Detail
-
RegistrationAssertion
public RegistrationAssertion(String deviceId)
Creates a new registration assertion for a device.- Parameters:
deviceId
- The identifier of the device.
-
-
Method Detail
-
getDeviceId
public String getDeviceId()
Gets the identifier of the asserted device.- Returns:
- The identifier.
-
getAuthorizedGateways
public List<String> getAuthorizedGateways()
Gets the gateway devices that are authorized to act on behalf of the device.- Returns:
- The gateway identifiers.
-
setAuthorizedGateways
public RegistrationAssertion setAuthorizedGateways(List<String> gatewayIds)
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.
-
getMapper
public String getMapper()
Gets the name of the mapper definition to use for the device.- Returns:
- The mapper or
null
if not set.
-
setMapper
public RegistrationAssertion setMapper(String mapper)
Sets the name of the mapper definition to use for the device.- Parameters:
mapper
- The mapper to set ornull
if no mapper should be used.- Returns:
- A reference to this object for method chaining.
-
getDefaults
public Map<String,Object> getDefaults()
Gets default properties to be used for augmenting messages from the device with missing information.- Returns:
- An unmodifiable view on the properties.
-
setDefaults
public RegistrationAssertion setDefaults(Map<String,Object> defaults)
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.
-
-