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 boolean
start()
Starts pollervoid
stop()
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:Poller
Starts poller- Specified by:
start
in interfacePoller
- Overrides:
start
in classFixedRatePoller
- Returns:
- true if the poller was successfully started
-
stop
public void stop()
Description copied from interface:Poller
Stops poller after finishing all started jobs- Specified by:
stop
in interfacePoller
- Overrides:
stop
in classFixedRatePoller
-
-