client-cpp  0.7.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)
 
virtual ~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 setConnectivityChecker (ConnectivityCheckerPtr checker)
 
void onReadEvent (const boost::system::error_code &err)
 
void onPingTimeout (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 ()
 
- Public Member Functions inherited from kaa::IDataChannel
virtual ~IDataChannel ()
 

Detailed Description

Definition at line 44 of file DefaultOperationTcpChannel.hpp.

Constructor & Destructor Documentation

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

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 53 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 63 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 75 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 71 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 55 of file DefaultOperationTcpChannel.hpp.

void kaa::DefaultOperationTcpChannel::onConnack ( const ConnackMessage message)
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 ( )
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 79 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::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: