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 Details

    • RegistrationAssertion

      public RegistrationAssertion(String deviceId)
      Creates a new registration assertion for a device.
      Parameters:
      deviceId - The identifier of the device.
  • Method Details

    • 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 or null to clear the list.
      Returns:
      A reference to this object for method chaining.
    • getDownstreamMessageMapper

      public String getDownstreamMessageMapper()
      Gets the name of the downstream mapper definition to use for the device.
      Returns:
      The downstream mapper or null if not set.
    • setDownstreamMessageMapper

      public RegistrationAssertion setDownstreamMessageMapper(String downstreamMessageMapper)
      Sets the name of the downstream mapper definition to use for the device.
      Parameters:
      downstreamMessageMapper - The mapper to set or null if no downstream mapper should be used.
      Returns:
      A reference to this object for method chaining.
    • getUpstreamMessageMapper

      public String getUpstreamMessageMapper()
      Gets the name of the upstream mapper definition to use for the device.
      Returns:
      The upstream mapper or null if not set.
    • setUpstreamMessageMapper

      public RegistrationAssertion setUpstreamMessageMapper(String upstreamMessageMapper)
      Sets the name of the upstream mapper definition to use for the device.
      Parameters:
      upstreamMessageMapper - The upstream mapper to set or null if no upstream 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 or null to clear all properties.
      Returns:
      A reference to this object for method chaining.
    • getCommandEndpoint

      public CommandEndpoint getCommandEndpoint()
      Gets the endpoint to use when sending commands.
      Returns:
      The command endpoint or null if not set.
    • setCommandEndpoint

      public RegistrationAssertion setCommandEndpoint(CommandEndpoint commandEndpoint)
      Sets the command endpoint to be used when sending commands.
      Parameters:
      commandEndpoint - The command endpoint to set or null if no command endpoint is available.
      Returns:
      A reference to this object for method chaining.