Class DeviceCredentialsApiImpl
- java.lang.Object
-
- com.cumulocity.sdk.client.devicecontrol.DeviceCredentialsApiImpl
-
- All Implemented Interfaces:
DeviceCredentialsApi
public class DeviceCredentialsApiImpl extends Object implements DeviceCredentialsApi
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEVICE_CREDENTIALS_URIstatic StringDEVICE_REQUEST_URI
-
Constructor Summary
Constructors Constructor Description DeviceCredentialsApiImpl(PlatformParameters platformParameters, RestConnector restConnector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(NewDeviceRequestRepresentation representation)Remove a device registration.DeviceCredentialsRepresentationpollCredentials(String deviceId)Executes single request to credentials endpointDeviceCredentialsRepresentationpollCredentials(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 timeoutDeviceCredentialsRepresentationpollCredentials(String deviceId, PollingStrategy pollingStrategy)Device poll credentialsNewDeviceRequestRepresentationregister(String id)Register a new device.
-
-
-
Field Detail
-
DEVICE_CREDENTIALS_URI
public static final String DEVICE_CREDENTIALS_URI
- See Also:
- Constant Field Values
-
DEVICE_REQUEST_URI
public static final String DEVICE_REQUEST_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeviceCredentialsApiImpl
public DeviceCredentialsApiImpl(PlatformParameters platformParameters, RestConnector restConnector)
-
-
Method Detail
-
register
public NewDeviceRequestRepresentation register(String id)
Description copied from interface:DeviceCredentialsApiRegister a new device.- Specified by:
registerin interfaceDeviceCredentialsApi- Parameters:
id- external id of the device to register- Returns:
- new device request representation
-
delete
public void delete(NewDeviceRequestRepresentation representation)
Description copied from interface:DeviceCredentialsApiRemove a device registration.- Specified by:
deletein interfaceDeviceCredentialsApi- Parameters:
representation- representation of new device request to delete
-
pollCredentials
public DeviceCredentialsRepresentation pollCredentials(String deviceId)
Description copied from interface:DeviceCredentialsApiExecutes single request to credentials endpoint- Specified by:
pollCredentialsin interfaceDeviceCredentialsApi- Parameters:
deviceId- device unique identifier- Returns:
- device credentials representation
-
pollCredentials
public DeviceCredentialsRepresentation pollCredentials(String deviceId, int interval, int timeout)
Description copied from interface:DeviceCredentialsApiSchedule polling credentials task, invoking it at the specified execution time and subsequently with the given interval Execution will end after timeout- Specified by:
pollCredentialsin 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:DeviceCredentialsApiDevice poll credentials- Specified by:
pollCredentialsin interfaceDeviceCredentialsApi- Parameters:
deviceId- device unique identifierpollingStrategy- credentials polling strategy- Returns:
- device credentials representation
-
-