Module Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. service. BaseDevice - com.
microsoft. azure. sdk. iot. service. Module
- com.
- com.
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
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:
- ame of the module (used as module id)
- Device key. If parameter is null, then the key will be auto generated.
Throws:
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:
- String containing the device name
- String containing the module name
- Device key. If parameter is null, then the key will be auto generated.
Returns:
Throws:
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:
- String containing the device name
- String containing the module name
- The type of authentication used by this device.
Returns:
Throws:
deviceId
or moduleId
is null
or empty.
getId
public String getId()
Getter for module name
Returns:
getManagedBy
public String getManagedBy()
Getter for module's managed by owner
Returns:
Applies to
Azure SDK for Java