Class DeviceCredentialsApiImpl
java.lang.Object
com.cumulocity.sdk.client.devicecontrol.DeviceCredentialsApiImpl
- All Implemented Interfaces:
DeviceCredentialsApi
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDeviceCredentialsApiImpl
(PlatformParameters platformParameters, RestConnector restConnector) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(NewDeviceRequestRepresentation representation) Remove a device registration.pollCredentials
(String deviceId) Executes single request to credentials endpointpollCredentials
(String deviceId, int interval, int timeout) Schedule polling credentials task, invoking it at the specified execution time and subsequently with the given interval Execution will end after timeoutpollCredentials
(String deviceId, PollingStrategy pollingStrategy) Device poll credentialsRegister a new device.
-
Field Details
-
DEVICE_CREDENTIALS_URI
- See Also:
-
DEVICE_REQUEST_URI
- See Also:
-
-
Constructor Details
-
DeviceCredentialsApiImpl
-
-
Method Details
-
register
Description copied from interface:DeviceCredentialsApi
Register a new device.- Specified by:
register
in interfaceDeviceCredentialsApi
- Parameters:
id
- external id of the device to register- Returns:
- new device request representation
-
delete
Description copied from interface:DeviceCredentialsApi
Remove a device registration.- Specified by:
delete
in interfaceDeviceCredentialsApi
- Parameters:
representation
- representation of new device request to delete
-
pollCredentials
Description copied from interface:DeviceCredentialsApi
Executes single request to credentials endpoint- Specified by:
pollCredentials
in interfaceDeviceCredentialsApi
- Parameters:
deviceId
- device unique identifier- Returns:
- device credentials representation
-
pollCredentials
Description copied from interface:DeviceCredentialsApi
Schedule polling credentials task, invoking it at the specified execution time and subsequently with the given interval Execution will end after timeout- Specified by:
pollCredentials
in interfaceDeviceCredentialsApi
- Parameters:
deviceId
- device unique identifierinterval
- - how often request is sent in secondstimeout
- - after how many seconds polling process will expire- Returns:
- device credentials representation
-
pollCredentials
public DeviceCredentialsRepresentation pollCredentials(String deviceId, PollingStrategy pollingStrategy) Description copied from interface:DeviceCredentialsApi
Device poll credentials- Specified by:
pollCredentials
in interfaceDeviceCredentialsApi
- Parameters:
deviceId
- device unique identifierpollingStrategy
- credentials polling strategy- Returns:
- device credentials representation
-