public class AssignDeviceRequestExecutor extends RequestExecutor<java.lang.String>
DevicesApi. Use this class if you want to assign
devices either to manager or to venue through fluent API in chained fashion. Example of use:
KontaktCloud kontaktCloud = KontaktCloudFactory.create();
kontaktCloud.devices().assign(IDs)
.toManager(managerId)
.execute();
Keep in mind that toManager cannot be used with toVenue and so on.
In such a situation an exception will be thrown at runtime.| Constructor and Description |
|---|
AssignDeviceRequestExecutor(DevicesService devicesService,
java.lang.String... uniqueIds)
Constructs request executor initialized with corresponding service class and device unique IDs.
|
AssignDeviceRequestExecutor(DevicesService devicesService,
java.util.UUID... deviceIds)
Constructs request executor initialized with corresponding service class and device unique IDs.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
execute()
Executes created request synchronously.
|
void |
execute(CloudCallback<java.lang.String> callback)
Executes created request asynchronously and invokes callback with the result.
|
AssignDeviceRequestExecutor |
toManager(java.util.UUID managerId)
Specifies the manager.
|
AssignDeviceRequestExecutor |
toVenue(java.util.UUID venueId)
Specifies the venue.
|
public AssignDeviceRequestExecutor(DevicesService devicesService, java.util.UUID... deviceIds)
devicesService - the devices API service.deviceIds - device unique identifiers.public AssignDeviceRequestExecutor(DevicesService devicesService, java.lang.String... uniqueIds)
devicesService - the devices API service.uniqueIds - device unique identifiers.public AssignDeviceRequestExecutor toVenue(java.util.UUID venueId)
toManager simultaneously.venueId - venue unique identifier.public AssignDeviceRequestExecutor toManager(java.util.UUID managerId)
toVenue simultaneously.managerId - manager unique identifier.public java.lang.String execute()
throws java.io.IOException,
KontaktCloudException
execute in class RequestExecutor<java.lang.String>java.io.IOException - exceptionKontaktCloudException - exceptionpublic void execute(CloudCallback<java.lang.String> callback)
execute in class RequestExecutor<java.lang.String>callback - the callback object.