OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XmppChannelMux Class Reference

#include <xmpp_channel_mux.h>

Inheritance diagram for XmppChannelMux:
Collaboration diagram for XmppChannelMux:

Public Member Functions

 XmppChannelMux (XmppConnection *)
 
virtual ~XmppChannelMux ()
 
virtual void Close ()
 
virtual bool Send (const uint8_t *msg, size_t msg_size, xmps::PeerId id, SendReadyCb cb)
 
virtual bool Send (const uint8_t *, size_t, const std::string *, xmps::PeerId, SendReadyCb)
 
virtual int GetTaskInstance () const
 
virtual void RegisterReferer (xmps::PeerId)
 
virtual void UnRegisterReferer (xmps::PeerId)
 
virtual void RegisterReceive (xmps::PeerId, ReceiveCb)
 
virtual void UnRegisterReceive (xmps::PeerId)
 
virtual void RegisterRxMessageTraceCallback (RxMessageTraceCb cb)
 
virtual void RegisterTxMessageTraceCallback (TxMessageTraceCb cb)
 
size_t ReceiverCount () const
 
size_t RefererCount () const
 
std::vector< std::string > GetReceiverList () const
 
virtual const std::string & ToString () const
 
virtual const std::string & FromString () const
 
virtual std::string StateName () const
 
virtual xmps::PeerState GetPeerState () const
 
virtual std::string LastStateName () const
 
virtual std::string LastStateChangeAt () const
 
virtual std::string LastEvent () const
 
virtual uint32_t rx_open () const
 
virtual uint32_t rx_close () const
 
virtual uint32_t rx_update () const
 
virtual uint32_t rx_keepalive () const
 
virtual uint32_t tx_open () const
 
virtual uint32_t tx_close () const
 
virtual uint32_t tx_update () const
 
virtual uint32_t tx_keepalive () const
 
virtual uint32_t FlapCount () const
 
virtual std::string LastFlap () const
 
virtual std::string AuthType () const
 
virtual std::string PeerAddress () const
 
virtual bool LastReceived (time_t duration) const
 
virtual bool LastSent (time_t duration) const
 
virtual void ProcessXmppMessage (const XmppStanza::XmppMessage *msg)
 
void WriteReady (const boost::system::error_code &ec)
 
virtual void UnRegisterWriteReady (xmps::PeerId id)
 
void HandleStateEvent (xmsm::XmState state)
 
virtual const XmppConnectionconnection () const
 
virtual XmppConnectionconnection ()
 
bool RxMessageTrace (const std::string &to_address, int port, int msg_size, const std::string &msg, const XmppStanza::XmppMessage *xmpp_msg)
 
bool TxMessageTrace (const std::string &to_address, int port, int msg_size, const std::string &msg, const XmppStanza::XmppMessage *xmpp_msg)
 
- Public Member Functions inherited from XmppChannel
virtual ~XmppChannel ()
 

Private Types

typedef std::map< xmps::PeerId,
SendReadyCb
WriteReadyCbMap
 
typedef std::map< xmps::PeerId,
ReceiveCb
ReceiveCbMap
 
typedef std::set< xmps::PeerIdRefererSet
 

Private Member Functions

void RegisterWriteReady (xmps::PeerId, SendReadyCb)
 

Private Attributes

WriteReadyCbMap map_
 
ReceiveCbMap rxmap_
 
SendReadyCb cb_
 
RefererSet referers_
 
XmppConnectionconnection_
 
tbb::mutex mutex_
 
RxMessageTraceCb rx_message_trace_cb_
 
TxMessageTraceCb tx_message_trace_cb_
 
tbb::atomic< time_t > last_received_
 
tbb::atomic< time_t > last_sent_
 

Friends

class XmppChannelMuxMock
 

Additional Inherited Members

- Public Types inherited from XmppChannel
typedef boost::function< void(const
boost::system::error_code &)> 
SendReadyCb
 
typedef boost::function< void(const
XmppStanza::XmppMessage
*, xmps::PeerState state) > 
ReceiveCb
 
typedef boost::function< bool(const
std::string &, int, int, const
std::string &, const
XmppStanza::XmppMessage *msg) > 
RxMessageTraceCb
 
typedef boost::function< bool(const
std::string &, int, int, const
std::string &, const
XmppStanza::XmppMessage *msg) > 
TxMessageTraceCb
 

Detailed Description

Definition at line 17 of file xmpp_channel_mux.h.

Member Typedef Documentation

Definition at line 86 of file xmpp_channel_mux.h.

typedef std::set<xmps::PeerId> XmppChannelMux::RefererSet
private

Definition at line 87 of file xmpp_channel_mux.h.

Definition at line 85 of file xmpp_channel_mux.h.

Constructor & Destructor Documentation

XmppChannelMux::XmppChannelMux ( XmppConnection connection)
explicit

Definition at line 16 of file xmpp_channel_mux.cc.

XmppChannelMux::~XmppChannelMux ( )
virtual

Definition at line 23 of file xmpp_channel_mux.cc.

Member Function Documentation

std::string XmppChannelMux::AuthType ( ) const
virtual

Implements XmppChannel.

Definition at line 153 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

void XmppChannelMux::Close ( )
virtual

Implements XmppChannel.

Definition at line 27 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

virtual const XmppConnection* XmppChannelMux::connection ( ) const
inlinevirtual

Implements XmppChannel.

Definition at line 69 of file xmpp_channel_mux.h.

virtual XmppConnection* XmppChannelMux::connection ( )
inlinevirtual

Implements XmppChannel.

Definition at line 70 of file xmpp_channel_mux.h.

uint32_t XmppChannelMux::FlapCount ( ) const
virtual

Implements XmppChannel.

Definition at line 244 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

const std::string & XmppChannelMux::FromString ( ) const
virtual

Implements XmppChannel.

Definition at line 145 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

xmps::PeerState XmppChannelMux::GetPeerState ( ) const
virtual

Implements XmppChannel.

Definition at line 39 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

vector< string > XmppChannelMux::GetReceiverList ( ) const

Definition at line 119 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

int XmppChannelMux::GetTaskInstance ( ) const
virtual

Implements XmppChannel.

Definition at line 72 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

void XmppChannelMux::HandleStateEvent ( xmsm::XmState  state)

Definition at line 192 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

std::string XmppChannelMux::LastEvent ( ) const
virtual

Implements XmppChannel.

Definition at line 217 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

std::string XmppChannelMux::LastFlap ( ) const
virtual

Implements XmppChannel.

Definition at line 247 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

bool XmppChannelMux::LastReceived ( time_t  duration) const
virtual

Implements XmppChannel.

Definition at line 31 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

bool XmppChannelMux::LastSent ( time_t  duration) const
virtual

Implements XmppChannel.

Definition at line 35 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

std::string XmppChannelMux::LastStateChangeAt ( ) const
virtual

Implements XmppChannel.

Definition at line 214 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

std::string XmppChannelMux::LastStateName ( ) const
virtual

Implements XmppChannel.

Definition at line 211 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

std::string XmppChannelMux::PeerAddress ( ) const
virtual

Implements XmppChannel.

Definition at line 157 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

void XmppChannelMux::ProcessXmppMessage ( const XmppStanza::XmppMessage msg)
virtual

Definition at line 181 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

size_t XmppChannelMux::ReceiverCount ( ) const

Definition at line 115 of file xmpp_channel_mux.cc.

size_t XmppChannelMux::RefererCount ( ) const

Definition at line 111 of file xmpp_channel_mux.cc.

void XmppChannelMux::RegisterReceive ( xmps::PeerId  id,
ReceiveCb  cb 
)
virtual

Implements XmppChannel.

Definition at line 84 of file xmpp_channel_mux.cc.

void XmppChannelMux::RegisterReferer ( xmps::PeerId  id)
virtual

Reimplemented from XmppChannel.

Definition at line 76 of file xmpp_channel_mux.cc.

void XmppChannelMux::RegisterRxMessageTraceCallback ( RxMessageTraceCb  cb)
virtual

Implements XmppChannel.

Definition at line 251 of file xmpp_channel_mux.cc.

void XmppChannelMux::RegisterTxMessageTraceCallback ( TxMessageTraceCb  cb)
virtual

Implements XmppChannel.

Definition at line 254 of file xmpp_channel_mux.cc.

void XmppChannelMux::RegisterWriteReady ( xmps::PeerId  id,
SendReadyCb  cb 
)
private

Definition at line 130 of file xmpp_channel_mux.cc.

uint32_t XmppChannelMux::rx_close ( ) const
virtual

Implements XmppChannel.

Definition at line 223 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

uint32_t XmppChannelMux::rx_keepalive ( ) const
virtual

Implements XmppChannel.

Definition at line 229 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

uint32_t XmppChannelMux::rx_open ( ) const
virtual

Implements XmppChannel.

Definition at line 220 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

uint32_t XmppChannelMux::rx_update ( ) const
virtual

Implements XmppChannel.

Definition at line 226 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

bool XmppChannelMux::RxMessageTrace ( const std::string &  to_address,
int  port,
int  msg_size,
const std::string &  msg,
const XmppStanza::XmppMessage xmpp_msg 
)

Definition at line 258 of file xmpp_channel_mux.cc.

virtual bool XmppChannelMux::Send ( const uint8_t *  msg,
size_t  msg_size,
xmps::PeerId  id,
SendReadyCb  cb 
)
inlinevirtual

Implements XmppChannel.

Definition at line 23 of file xmpp_channel_mux.h.

virtual bool XmppChannelMux::Send ( const uint8_t *  ,
size_t  ,
const std::string *  ,
xmps::PeerId  ,
SendReadyCb   
)
virtual

Reimplemented from XmppChannel.

std::string XmppChannelMux::StateName ( ) const
virtual

Implements XmppChannel.

Definition at line 149 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

const std::string & XmppChannelMux::ToString ( ) const
virtual

Implements XmppChannel.

Definition at line 141 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

uint32_t XmppChannelMux::tx_close ( ) const
virtual

Implements XmppChannel.

Definition at line 235 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

uint32_t XmppChannelMux::tx_keepalive ( ) const
virtual

Implements XmppChannel.

Definition at line 241 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

uint32_t XmppChannelMux::tx_open ( ) const
virtual

Implements XmppChannel.

Definition at line 232 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

uint32_t XmppChannelMux::tx_update ( ) const
virtual

Implements XmppChannel.

Definition at line 238 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

bool XmppChannelMux::TxMessageTrace ( const std::string &  to_address,
int  port,
int  msg_size,
const std::string &  msg,
const XmppStanza::XmppMessage xmpp_msg 
)

Definition at line 269 of file xmpp_channel_mux.cc.

void XmppChannelMux::UnRegisterReceive ( xmps::PeerId  id)
virtual

Implements XmppChannel.

Definition at line 88 of file xmpp_channel_mux.cc.

Here is the call graph for this function:

void XmppChannelMux::UnRegisterReferer ( xmps::PeerId  id)
virtual

Reimplemented from XmppChannel.

Definition at line 80 of file xmpp_channel_mux.cc.

void XmppChannelMux::UnRegisterWriteReady ( xmps::PeerId  id)
virtual

Implements XmppChannel.

Definition at line 137 of file xmpp_channel_mux.cc.

void XmppChannelMux::WriteReady ( const boost::system::error_code &  ec)

Definition at line 45 of file xmpp_channel_mux.cc.

Friends And Related Function Documentation

friend class XmppChannelMuxMock
friend

Definition at line 80 of file xmpp_channel_mux.h.

Member Data Documentation

SendReadyCb XmppChannelMux::cb_
private

Definition at line 91 of file xmpp_channel_mux.h.

XmppConnection* XmppChannelMux::connection_
private

Definition at line 93 of file xmpp_channel_mux.h.

tbb::atomic<time_t> XmppChannelMux::last_received_
private

Definition at line 97 of file xmpp_channel_mux.h.

tbb::atomic<time_t> XmppChannelMux::last_sent_
private

Definition at line 98 of file xmpp_channel_mux.h.

WriteReadyCbMap XmppChannelMux::map_
private

Definition at line 89 of file xmpp_channel_mux.h.

tbb::mutex XmppChannelMux::mutex_
private

Definition at line 94 of file xmpp_channel_mux.h.

RefererSet XmppChannelMux::referers_
private

Definition at line 92 of file xmpp_channel_mux.h.

RxMessageTraceCb XmppChannelMux::rx_message_trace_cb_
private

Definition at line 95 of file xmpp_channel_mux.h.

ReceiveCbMap XmppChannelMux::rxmap_
private

Definition at line 90 of file xmpp_channel_mux.h.

TxMessageTraceCb XmppChannelMux::tx_message_trace_cb_
private

Definition at line 96 of file xmpp_channel_mux.h.


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