Kanzi Connect 3.9.14
kanzi::connect::DefaultContentLoader Class Reference

Implementation of content loader that connects to Content Manager in Kanzi Connect server. More...

#include <default_content_loader.hpp>

Inheritance diagram for kanzi::connect::DefaultContentLoader:
kanzi::connect::ContentLoader

Public Member Functions

bool connectUsingUnreliableBearer ()
 Determines whether this content loader will (eventually) connect using unreliable bearer.
 
 DefaultContentLoader (ClientSharedPtr client)
 Constructor.
 
InterfaceDomain * getDomain () const
 Return access to server interfaces.
 
shared_ptr< p2p::RoutingRules::Endpoint > getP2PEndpoint ()
 Retrieve associated P2P endpoint.
 
string getUri () const
 
const string & runtimeSubscribedToService () const
 
const string & runtimeSubscriptionWaitsService () const
 
void setP2PEndpoint (shared_ptr< p2p::RoutingRules::Endpoint > endpoint)
 
void stopBecauseServiceVanished ()
 Stop because the bound service vanished.
 
virtual ~DefaultContentLoader () override
 Destructor.
 
virtual void start (ContentQueryArgumentsSharedPtr args) override
 
virtual void startRuntime (const string uri, int credits, int creditReturnInterval) override
 Starts runtime loading of data from a specific address.
 
virtual void stop () override
 Function to stop / cancel the tracking process.
 
- Public Member Functions inherited from kanzi::connect::ContentLoader
void addObserver (Observer *observer)
 Subscribe to content notification callbacks.
 
 ContentLoader ()
 Constructor.
 
void removeObserver (Observer *observer)
 Unsubscribe from content notification callbacks.
 
virtual ~ContentLoader ()=default
 dtor
 

Protected Member Functions

void startRuntimeSubscription (const string &uri)
 
void startSubscription (ContentQueryArgumentsSharedPtr args)
 
void stopSubscription ()
 
- Protected Member Functions inherited from kanzi::connect::ContentLoader
void notifyContentInvalidated ()
 Invoke observer callback when previously loaded content is invalidated.
 
void notifyContentLoaded (ContentResult *result)
 Invoke observer callback when new content result is received.
 
void notifyRuntimeDataUpdateReceived (const string &uri, const string &stream)
 

Detailed Description

Implementation of content loader that connects to Content Manager in Kanzi Connect server.

Constructor & Destructor Documentation

◆ DefaultContentLoader()

kanzi::connect::DefaultContentLoader::DefaultContentLoader ( ClientSharedPtr client)

Constructor.

Parameters
clientAccess to server, message dispatcher and task queue

◆ ~DefaultContentLoader()

virtual kanzi::connect::DefaultContentLoader::~DefaultContentLoader ( )
overridevirtual

Destructor.

Member Function Documentation

◆ connectUsingUnreliableBearer()

bool kanzi::connect::DefaultContentLoader::connectUsingUnreliableBearer ( )

Determines whether this content loader will (eventually) connect using unreliable bearer.

Returns
true if unreliable bearer will be used.

◆ getDomain()

InterfaceDomain * kanzi::connect::DefaultContentLoader::getDomain ( ) const

Return access to server interfaces.

Returns
Interface domain, gateway to server interfaces.

◆ getP2PEndpoint()

shared_ptr< p2p::RoutingRules::Endpoint > kanzi::connect::DefaultContentLoader::getP2PEndpoint ( )
inline

Retrieve associated P2P endpoint.

Returns
P2P endpoint in case this loader is bound to P2P connection.

◆ getUri()

string kanzi::connect::DefaultContentLoader::getUri ( ) const
inline

◆ runtimeSubscribedToService()

const string & kanzi::connect::DefaultContentLoader::runtimeSubscribedToService ( ) const
inline

◆ runtimeSubscriptionWaitsService()

const string & kanzi::connect::DefaultContentLoader::runtimeSubscriptionWaitsService ( ) const
inline

◆ setP2PEndpoint()

void kanzi::connect::DefaultContentLoader::setP2PEndpoint ( shared_ptr< p2p::RoutingRules::Endpoint > endpoint)
inline

◆ start()

virtual void kanzi::connect::DefaultContentLoader::start ( ContentQueryArgumentsSharedPtr args)
overridevirtual

◆ startRuntime()

virtual void kanzi::connect::DefaultContentLoader::startRuntime ( const string uri,
int credits,
int creditReturnInterval )
overridevirtual

Starts runtime loading of data from a specific address.

Parameters
urithe uri where from to load.
creditstotal amount of transfer credits.
creditReturnIntervalafter how many received packets credits are returned to sender.

Implements kanzi::connect::ContentLoader.

◆ startRuntimeSubscription()

void kanzi::connect::DefaultContentLoader::startRuntimeSubscription ( const string & uri)
protected

◆ startSubscription()

void kanzi::connect::DefaultContentLoader::startSubscription ( ContentQueryArgumentsSharedPtr args)
protected

◆ stop()

virtual void kanzi::connect::DefaultContentLoader::stop ( )
overridevirtual

Function to stop / cancel the tracking process.

Implements kanzi::connect::ContentLoader.

◆ stopBecauseServiceVanished()

void kanzi::connect::DefaultContentLoader::stopBecauseServiceVanished ( )

Stop because the bound service vanished.

◆ stopSubscription()

void kanzi::connect::DefaultContentLoader::stopSubscription ( )
protected

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