client-cpp  0.10.0
kaa::KaaChannelManager Class Reference

#include <KaaChannelManager.hpp>

+ Inheritance diagram for kaa::KaaChannelManager:
+ Collaboration diagram for kaa::KaaChannelManager:

Public Member Functions

 KaaChannelManager (IBootstrapManager &manager, const BootstrapServers &servers, IKaaClientContext &context, IKaaClient *client)
 
 ~KaaChannelManager ()
 
virtual void setFailoverStrategy (IFailoverStrategyPtr strategy)
 
virtual void setChannel (TransportType type, IDataChannelPtr channel)
 
virtual void addChannel (IDataChannelPtr channel)
 
virtual void removeChannel (const std::string &id)
 
virtual void removeChannel (IDataChannelPtr channel)
 
virtual std::list
< IDataChannelPtr
getChannels ()
 
virtual IDataChannelPtr getChannelByTransportType (TransportType type)
 
virtual IDataChannelPtr getChannel (const std::string &channelId)
 
virtual void onServerFailed (ITransportConnectionInfoPtr connectionInfo, KaaFailoverReason reason)
 
virtual void onConnected (const EndpointConnectionInfo &connection)
 
virtual void onTransportConnectionInfoUpdated (ITransportConnectionInfoPtr connectionInfo)
 
virtual void clearChannelList ()
 
virtual ITransportConnectionInfoPtr getPingServer ()
 
virtual void setConnectivityChecker (ConnectivityCheckerPtr checker)
 
void shutdown ()
 
void pause ()
 
void resume ()
 
- Public Member Functions inherited from kaa::IKaaChannelManager
virtual ~IKaaChannelManager ()
 
- Public Member Functions inherited from kaa::IPingServerStorage
virtual ~IPingServerStorage ()
 

Detailed Description

Definition at line 37 of file KaaChannelManager.hpp.

Constructor & Destructor Documentation

kaa::KaaChannelManager::KaaChannelManager ( IBootstrapManager manager,
const BootstrapServers servers,
IKaaClientContext context,
IKaaClient client 
)
kaa::KaaChannelManager::~KaaChannelManager ( )
inline

Definition at line 45 of file KaaChannelManager.hpp.

Member Function Documentation

virtual void kaa::KaaChannelManager::addChannel ( IDataChannelPtr  channel)
virtual

Updates the manager by adding the channel.

Parameters
channelthe channel to be added.
See Also
IDataChannel

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::clearChannelList ( )
virtual

Clears the list of channels.

Implements kaa::IKaaChannelManager.

virtual IDataChannelPtr kaa::KaaChannelManager::getChannel ( const std::string &  channelId)
virtual

Retrieves channel by the unique channel id.

Parameters
idthe channel's id.
Returns
channel object.
See Also
IDataChannel

Implements kaa::IKaaChannelManager.

virtual IDataChannelPtr kaa::KaaChannelManager::getChannelByTransportType ( TransportType  type)
virtual

Retrieves the list of channels by the specific transport type.

Parameters
typethe transport's type.
Returns
the channels' list.
See Also
TransportType
IDataChannel

Implements kaa::IKaaChannelManager.

virtual std::list<IDataChannelPtr> kaa::KaaChannelManager::getChannels ( )
virtual

Retrieves a list of current channels.

Returns
a list of channels.
See Also
IDataChannel

Implements kaa::IKaaChannelManager.

virtual ITransportConnectionInfoPtr kaa::KaaChannelManager::getPingServer ( )
inlinevirtual

Implements kaa::IPingServerStorage.

Definition at line 66 of file KaaChannelManager.hpp.

virtual void kaa::KaaChannelManager::onConnected ( const EndpointConnectionInfo connection)
virtual

Reports to Channel Manager about successful connection.

Parameters
connectionconnection metadata.

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::onServerFailed ( ITransportConnectionInfoPtr  connectionInfo,
KaaFailoverReason  reason 
)
virtual

Reports to Channel Manager in case link with server was not established.

Parameters
serverthe parameters of server that was not connected.
See Also
ITransportConnectionInfo
Parameters
reasonThe reason which caused failure.
See Also
KaaFailoverReason

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::onTransportConnectionInfoUpdated ( ITransportConnectionInfoPtr  connectionInfo)
virtual

Reports to Channel Manager about the new server.

Parameters
newServerthe parameters of the new server.
See Also
ITransportConnectionInfo

Implements kaa::IKaaChannelManager.

void kaa::KaaChannelManager::pause ( )
virtual

Pauses all active channels.

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::removeChannel ( const std::string &  id)
virtual

Updates the manager by removing the channel from the manager.

Parameters
idthe channel's id.
See Also
KaaDataChannel

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::removeChannel ( IDataChannelPtr  channel)
virtual

Updates the manager by removing the channel from the manager.

Parameters
channelthe channel to be removed.
See Also
IDataChannel

Implements kaa::IKaaChannelManager.

void kaa::KaaChannelManager::resume ( )
virtual

Restores channels' activity.

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::setChannel ( TransportType  type,
IDataChannelPtr  channel 
)
virtual

Updates the manager by setting the channel to the specified transport type.

Parameters
typethe type of the transport which is going to receive updates using the specified channel.
channelthe channel to be added.
See Also
IDataChannel

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::setConnectivityChecker ( ConnectivityCheckerPtr  checker)
virtual

Sets connectivity checker to the current channel.

Parameters
checkerplatform-dependent connectivity checker.
See Also
IConnectivityChecker

Implements kaa::IKaaChannelManager.

virtual void kaa::KaaChannelManager::setFailoverStrategy ( IFailoverStrategyPtr  strategy)
virtual
void kaa::KaaChannelManager::shutdown ( )
virtual

Shuts down the manager and all registered channels. The instance can no longer be used.

Implements kaa::IKaaChannelManager.


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