client-cpp  0.10.0
kaa::DefaultOperationTcpChannel Class Reference

#include <DefaultOperationTcpChannel.hpp>

+ Inheritance diagram for kaa::DefaultOperationTcpChannel:
+ Collaboration diagram for kaa::DefaultOperationTcpChannel:

Public Member Functions

 DefaultOperationTcpChannel (IKaaChannelManager &channelManager, const KeyPair &clientKeys, IKaaClientContext &context)
 
 ~DefaultOperationTcpChannel ()
 
virtual void sync (TransportType type)
 
virtual void syncAll ()
 
virtual void syncAck (TransportType type)
 
virtual const std::string & getId () const
 
virtual TransportProtocolId getTransportProtocolId () const
 
virtual void setMultiplexer (IKaaDataMultiplexer *multiplexer)
 
virtual void setDemultiplexer (IKaaDataDemultiplexer *demultiplexer)
 
virtual void setServer (ITransportConnectionInfoPtr server)
 
virtual ITransportConnectionInfoPtr getServer ()
 
virtual void shutdown ()
 
virtual void pause ()
 
virtual void resume ()
 
virtual const std::map
< TransportType,
ChannelDirection > & 
getSupportedTransportTypes () const
 
virtual ServerType getServerType () const
 
virtual void setFailoverStrategy (IFailoverStrategyPtr strategy)
 
virtual void setConnectivityChecker (ConnectivityCheckerPtr checker)
 
void onReadEvent (const boost::system::error_code &err)
 
void onPingTimeout (const boost::system::error_code &err)
 
void onConnAckTimeout (const boost::system::error_code &err)
 
void onConnack (const ConnackMessage &message)
 
void onDisconnect (const DisconnectMessage &message)
 
void onKaaSync (const KaaSyncResponse &message)
 
void onPingResponse ()
 
void openConnection ()
 
void closeConnection ()
 
void onServerFailed (KaaFailoverReason failoverReason=KaaFailoverReason::CURRENT_OPERATIONS_SERVER_NA)
 
- Public Member Functions inherited from kaa::IDataChannel
virtual ~IDataChannel ()
 

Detailed Description

Definition at line 48 of file DefaultOperationTcpChannel.hpp.

Constructor & Destructor Documentation

kaa::DefaultOperationTcpChannel::DefaultOperationTcpChannel ( IKaaChannelManager channelManager,
const KeyPair clientKeys,
IKaaClientContext context 
)
kaa::DefaultOperationTcpChannel::~DefaultOperationTcpChannel ( )

Member Function Documentation

void kaa::DefaultOperationTcpChannel::closeConnection ( )
virtual const std::string& kaa::DefaultOperationTcpChannel::getId ( ) const
inlinevirtual

Retrieves the channel's id. It should be unique in existing channels scope.

Returns
the channel's id.

Implements kaa::IDataChannel.

Definition at line 60 of file DefaultOperationTcpChannel.hpp.

virtual ITransportConnectionInfoPtr kaa::DefaultOperationTcpChannel::getServer ( )
inlinevirtual

Retrieves current used server.

Returns
Server info.
See Also
IServerInfo

Implements kaa::IDataChannel.

Definition at line 70 of file DefaultOperationTcpChannel.hpp.

virtual ServerType kaa::DefaultOperationTcpChannel::getServerType ( ) const
inlinevirtual

Retrieves the channel's server type (i.e. BOOTSTRAP or OPERATIONS).

Returns
the channel's type.
See Also
ServerType

Implements kaa::IDataChannel.

Definition at line 82 of file DefaultOperationTcpChannel.hpp.

virtual const std::map<TransportType, ChannelDirection>& kaa::DefaultOperationTcpChannel::getSupportedTransportTypes ( ) const
inlinevirtual

Retrieves the map of transport types and their directions supported by this channel.

Returns
the map of transport types.
See Also
TransportType
ChannelDirection

Implements kaa::IDataChannel.

Definition at line 78 of file DefaultOperationTcpChannel.hpp.

virtual TransportProtocolId kaa::DefaultOperationTcpChannel::getTransportProtocolId ( ) const
inlinevirtual

Retrieves the TransportProtocolId.

Returns
the transport protocol id.
See Also
TransportProtocolId

Implements kaa::IDataChannel.

Definition at line 62 of file DefaultOperationTcpChannel.hpp.

void kaa::DefaultOperationTcpChannel::onConnack ( const ConnackMessage message)
void kaa::DefaultOperationTcpChannel::onConnAckTimeout ( const boost::system::error_code &  err)
void kaa::DefaultOperationTcpChannel::onDisconnect ( const DisconnectMessage message)
void kaa::DefaultOperationTcpChannel::onKaaSync ( const KaaSyncResponse message)
void kaa::DefaultOperationTcpChannel::onPingResponse ( )
void kaa::DefaultOperationTcpChannel::onPingTimeout ( const boost::system::error_code &  err)
void kaa::DefaultOperationTcpChannel::onReadEvent ( const boost::system::error_code &  err)
void kaa::DefaultOperationTcpChannel::onServerFailed ( KaaFailoverReason  failoverReason = KaaFailoverReason::CURRENT_OPERATIONS_SERVER_NA)
void kaa::DefaultOperationTcpChannel::openConnection ( )
virtual void kaa::DefaultOperationTcpChannel::pause ( )
virtual

Pauses the channel's workflow. The channel should stop all network activity.

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::resume ( )
virtual

Resumes the channel's workflow. The channel should restore the previous connection.

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::setConnectivityChecker ( ConnectivityCheckerPtr  checker)
inlinevirtual

Sets connectivity checker to the current channel.

Parameters
checkerplatform-dependent connectivity checker.
See Also
IConnectivityChecker

Implements kaa::IDataChannel.

Definition at line 90 of file DefaultOperationTcpChannel.hpp.

virtual void kaa::DefaultOperationTcpChannel::setDemultiplexer ( IKaaDataDemultiplexer demultiplexer)
virtual

Sets the request multiplexer for this channel.

Parameters
multiplexermultiplexer instance to be set.
See Also
IKaaDataMultiplexer

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::setFailoverStrategy ( IFailoverStrategyPtr  strategy)
inlinevirtual

Implements kaa::IDataChannel.

Definition at line 86 of file DefaultOperationTcpChannel.hpp.

virtual void kaa::DefaultOperationTcpChannel::setMultiplexer ( IKaaDataMultiplexer multiplexer)
virtual

Sets the response demultiplexer for this channel.

Parameters
demultiplexerdemultiplexer instance to be set.
See Also
IKaaDataDemultiplexer

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::setServer ( ITransportConnectionInfoPtr  connectionInfo)
virtual

Sets the connection data for the current channel.

Parameters
connectionInfoThe server's connection data.
See Also
ITransportConnectionInfo

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::shutdown ( )
virtual

Shuts down the channel instance. All connections and threads should be terminated. The instance can no longer be used.

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::sync ( TransportType  type)
virtual

Updates the channel's state of the specific service.

Parameters
typetransport type of the service.
See Also
TransportType

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::syncAck ( TransportType  type)
virtual

Updates the channel's state of all supported services.

Implements kaa::IDataChannel.

virtual void kaa::DefaultOperationTcpChannel::syncAll ( )
virtual

Updates the channel's state of all supported services.

Implements kaa::IDataChannel.


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