Class OperationsByAgentAndStatusPollerImpl
- java.lang.Object
-
- com.cumulocity.sdk.client.polling.FixedRatePoller
-
- com.cumulocity.sdk.client.devicecontrol.autopoll.OperationsByAgentAndStatusPollerImpl
-
- All Implemented Interfaces:
Poller
public class OperationsByAgentAndStatusPollerImpl extends FixedRatePoller
This class is an implementation of OperationsPollerInterface, its responsibility is to poll device control REST API for operations for given agent id. These operations are fetched and added to queue and there is a thread, which is polling operations from this queue and process them (using Poller interface implementation).
-
-
Constructor Summary
Constructors Constructor Description OperationsByAgentAndStatusPollerImpl(DeviceControlApi deviceControlApi, String agentId, OperationStatus status, OperationProcessor operationProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanstart()Starts pollervoidstop()Stops poller after finishing all started jobs-
Methods inherited from class com.cumulocity.sdk.client.polling.FixedRatePoller
getPeriod, getPollingTask, setPollingTask
-
-
-
-
Constructor Detail
-
OperationsByAgentAndStatusPollerImpl
public OperationsByAgentAndStatusPollerImpl(DeviceControlApi deviceControlApi, String agentId, OperationStatus status, OperationProcessor operationProcessor) throws SDKException
- Throws:
SDKException
-
-
Method Detail
-
start
public boolean start()
Description copied from interface:PollerStarts poller- Specified by:
startin interfacePoller- Overrides:
startin classFixedRatePoller- Returns:
- true if the poller was successfully started
-
stop
public void stop()
Description copied from interface:PollerStops poller after finishing all started jobs- Specified by:
stopin interfacePoller- Overrides:
stopin classFixedRatePoller
-
-