com.cumulocity.sdk.client.devicecontrol.autopoll
Class OperationsByAgentAndStatusPollerImpl

java.lang.Object
  extended by com.cumulocity.sdk.client.FixedRatePoller
      extended by 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
OperationsByAgentAndStatusPollerImpl(DeviceControlApi deviceControlApi, String agentId, OperationStatus status, OperationProcessor operationProcessor)
           
 
Method Summary
 boolean start()
          Starts poller
 void stop()
          Stops poller after finishing all started jobs
 
Methods inherited from class com.cumulocity.sdk.client.FixedRatePoller
getPeriod, getPollingTask, setPollingTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface Poller
Overrides:
start in class FixedRatePoller
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 interface Poller
Overrides:
stop in class FixedRatePoller


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.