Freigeben über


Module Class

public class Module
extends BaseDevice

Field Summary

Modifier and Type Field and Description
protected java.lang.String id

Module name A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.

protected java.lang.String managedBy

Specifies the module's managed by owner

Constructor Summary

Modifier Constructor Description
protected Module(String deviceId, String moduleId, SymmetricKey symmetricKey)

Create an Module instance using the given module name

Method Summary

Modifier and Type Method and Description
static Module createFromId(String deviceId, String moduleId, SymmetricKey symmetricKey)

Static create function Creates module object using the given name.

static Module createModule(String deviceId, String moduleId, AuthenticationType authenticationType)

Static create function Creates device object using the given name that will use a Certificate Authority signed certificate for authentication.

java.lang.String getId()

Getter for module name

java.lang.String getManagedBy()

Getter for module's managed by owner

Methods inherited from BaseDevice

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

id

protected String id

Module name A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.

managedBy

protected String managedBy

Specifies the module's managed by owner

Constructor Details

Module

protected Module(String deviceId, String moduleId, SymmetricKey symmetricKey)

Create an Module instance using the given module name

Parameters:

deviceId - Name of the device (used as device id)
moduleId -
  • ame of the module (used as module id)
symmetricKey -
  • Device key. If parameter is null, then the key will be auto generated.

Throws:

java.lang.IllegalArgumentException - This exception is thrown if deviceId or moduleId is null or empty.

Method Details

createFromId

public static Module createFromId(String deviceId, String moduleId, SymmetricKey symmetricKey)

Static create function Creates module object using the given name. If input symmetric key are null then they will be auto generated.

Parameters:

deviceId -
  • String containing the device name
moduleId -
  • String containing the module name
symmetricKey -
  • Device key. If parameter is null, then the key will be auto generated.

Returns:

Module object

Throws:

java.lang.IllegalArgumentException - This exception is thrown if deviceId is null or empty.

createModule

public static Module createModule(String deviceId, String moduleId, AuthenticationType authenticationType)

Static create function Creates device object using the given name that will use a Certificate Authority signed certificate for authentication.

Parameters:

deviceId -
  • String containing the device name
moduleId -
  • String containing the module name
authenticationType -
  • The type of authentication used by this device.

Returns:

Module object

Throws:

java.lang.IllegalArgumentException - This exception is thrown if deviceId or moduleId is null or empty.

getId

public String getId()

Getter for module name

Returns:

The module string

getManagedBy

public String getManagedBy()

Getter for module's managed by owner

Returns:

The string containing the managed by owner

Applies to