libkazv
Kazv::JobInterface Struct Referenceabstract

#include <jobinterface.hpp>

Inheritance diagram for Kazv::JobInterface:

Public Member Functions

virtual ~JobInterface ()=default
 
virtual void async (std::function< void()> func)=0
 
virtual void setTimeout (std::function< void()> func, int ms, std::optional< std::string > timerId=std::nullopt)=0
 
virtual void setInterval (std::function< void()> func, int ms, std::optional< std::string > timerId=std::nullopt)=0
 
virtual void cancel (std::string timerId)=0
 cancels all pending timers with timerId More...
 
virtual void submit (BaseJob job, std::function< void(Response)> callback)=0
 makes an async fetch. More...
 

Constructor & Destructor Documentation

◆ ~JobInterface()

virtual Kazv::JobInterface::~JobInterface ( )
virtualdefault

Member Function Documentation

◆ async()

virtual void Kazv::JobInterface::async ( std::function< void()>  func)
pure virtual

Implemented in Kazv::CprJobHandler.

◆ cancel()

virtual void Kazv::JobInterface::cancel ( std::string  timerId)
pure virtual

cancels all pending timers with timerId

Implemented in Kazv::CprJobHandler.

◆ setInterval()

virtual void Kazv::JobInterface::setInterval ( std::function< void()>  func,
int  ms,
std::optional< std::string >  timerId = std::nullopt 
)
pure virtual

Implemented in Kazv::CprJobHandler.

◆ setTimeout()

virtual void Kazv::JobInterface::setTimeout ( std::function< void()>  func,
int  ms,
std::optional< std::string >  timerId = std::nullopt 
)
pure virtual

Implemented in Kazv::CprJobHandler.

◆ submit()

virtual void Kazv::JobInterface::submit ( BaseJob  job,
std::function< void(Response)>  callback 
)
pure virtual

makes an async fetch.

callback should not block the current thread. if job has a queueId, it must be queued and executed only after every job before it in the queue queueId returned. if job has a queuePolicy of CancelFutureIfFailed, the failure of this job must remove every other job after it in the queue queueId.

Implemented in Kazv::CprJobHandler.


The documentation for this struct was generated from the following file: