OpenSDN source code
BgpXmppChannelManager Class Reference

#include <bgp_xmpp_channel.h>

Collaboration diagram for BgpXmppChannelManager:

Public Types

typedef std::map< const XmppChannel *, BgpXmppChannel * > XmppChannelMap
 
typedef std::map< std::string, BgpXmppChannel * > XmppChannelNameMap
 
typedef XmppChannelNameMap::const_iterator const_name_iterator
 
typedef boost::function< void(BgpXmppChannel *)> VisitorFn
 

Public Member Functions

 BgpXmppChannelManager (XmppServer *, BgpServer *)
 
virtual ~BgpXmppChannelManager ()
 
const_name_iterator name_cbegin () const
 
const_name_iterator name_cend () const
 
const_name_iterator name_clower_bound (const std::string &name) const
 
void VisitChannels (BgpXmppChannelManager::VisitorFn)
 
void VisitChannels (BgpXmppChannelManager::VisitorFn) const
 
BgpXmppChannelFindChannel (const XmppChannel *channel)
 
BgpXmppChannelFindChannel (std::string client)
 
void RemoveChannel (XmppChannel *channel)
 
virtual void XmppHandleChannelEvent (XmppChannel *channel, xmps::PeerState state)
 
const XmppChannelMapchannel_map () const
 
void Enqueue (BgpXmppChannel *bx_channel)
 
bool IsReadyForDeletion ()
 
void SetQueueDisable (bool disabled)
 
size_t GetQueueSize () const
 
void AdminDownCallback ()
 
void ASNUpdateCallback (as_t old_asn, as_t old_local_asn)
 
void IdentifierUpdateCallback (Ip4Address old_identifier)
 
void RoutingInstanceCallback (std::string vrf_name, int op)
 
void DSCPUpdateCallback (uint8_t value)
 
uint32_t count () const
 
uint32_t NumUpPeer () const
 
int32_t deleting_count () const
 
void increment_deleting_count ()
 
void decrement_deleting_count ()
 
BgpServerbgp_server ()
 
XmppServerxmpp_server ()
 
const XmppServerxmpp_server () const
 
uint64_t get_subscription_gen_id ()
 
bool CollectStats (BgpRouterState *state, bool first) const
 

Protected Member Functions

virtual BgpXmppChannelCreateChannel (XmppChannel *channel)
 
virtual bool DeleteChannel (BgpXmppChannel *channel)
 

Private Member Functions

void FillPeerInfo (const BgpXmppChannel *channel) const
 
 DISALLOW_COPY_AND_ASSIGN (BgpXmppChannelManager)
 

Private Attributes

XmppServerxmpp_server_
 
BgpServerbgp_server_
 
WorkQueue< BgpXmppChannel * > queue_
 
tbb::mutex mutex_
 
XmppChannelMap channel_map_
 
XmppChannelNameMap channel_name_map_
 
int id_
 
int admin_down_listener_id_
 
int asn_listener_id_
 
int identifier_listener_id_
 
int dscp_listener_id_
 
tbb::atomic< int32_t > deleting_count_
 
tbb::atomic< uint64_t > subscription_gen_id_
 

Friends

class BgpXmppChannelManagerMock
 
class BgpXmppUnitTest
 

Detailed Description

Definition at line 384 of file bgp_xmpp_channel.h.

Member Typedef Documentation

◆ const_name_iterator

typedef XmppChannelNameMap::const_iterator BgpXmppChannelManager::const_name_iterator

Definition at line 388 of file bgp_xmpp_channel.h.

◆ VisitorFn

typedef boost::function<void(BgpXmppChannel *)> BgpXmppChannelManager::VisitorFn

Definition at line 389 of file bgp_xmpp_channel.h.

◆ XmppChannelMap

Definition at line 386 of file bgp_xmpp_channel.h.

◆ XmppChannelNameMap

Definition at line 387 of file bgp_xmpp_channel.h.

Constructor & Destructor Documentation

◆ BgpXmppChannelManager()

BgpXmppChannelManager::BgpXmppChannelManager ( XmppServer xmpp_server,
BgpServer server 
)

Definition at line 3016 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ ~BgpXmppChannelManager()

BgpXmppChannelManager::~BgpXmppChannelManager ( )
virtual

Definition at line 3057 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AdminDownCallback()

void BgpXmppChannelManager::AdminDownCallback ( )

Definition at line 3084 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ ASNUpdateCallback()

void BgpXmppChannelManager::ASNUpdateCallback ( as_t  old_asn,
as_t  old_local_asn 
)

Definition at line 3092 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ bgp_server()

BgpServer* BgpXmppChannelManager::bgp_server ( )
inline

Definition at line 441 of file bgp_xmpp_channel.h.

◆ channel_map()

const XmppChannelMap& BgpXmppChannelManager::channel_map ( ) const
inline

Definition at line 412 of file bgp_xmpp_channel.h.

◆ CollectStats()

bool BgpXmppChannelManager::CollectStats ( BgpRouterState *  state,
bool  first 
) const

Definition at line 3256 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ count()

uint32_t BgpXmppChannelManager::count ( ) const
inline

Definition at line 425 of file bgp_xmpp_channel.h.

◆ CreateChannel()

BgpXmppChannel * BgpXmppChannelManager::CreateChannel ( XmppChannel channel)
protectedvirtual

Definition at line 3156 of file bgp_xmpp_channel.cc.

◆ decrement_deleting_count()

void BgpXmppChannelManager::decrement_deleting_count ( )
inline

Definition at line 436 of file bgp_xmpp_channel.h.

◆ DeleteChannel()

bool BgpXmppChannelManager::DeleteChannel ( BgpXmppChannel channel)
protectedvirtual

Definition at line 3007 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ deleting_count()

int32_t BgpXmppChannelManager::deleting_count ( ) const
inline

Definition at line 434 of file bgp_xmpp_channel.h.

◆ DISALLOW_COPY_AND_ASSIGN()

BgpXmppChannelManager::DISALLOW_COPY_AND_ASSIGN ( BgpXmppChannelManager  )
private

◆ DSCPUpdateCallback()

void BgpXmppChannelManager::DSCPUpdateCallback ( uint8_t  value)

Definition at line 3088 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ Enqueue()

void BgpXmppChannelManager::Enqueue ( BgpXmppChannel bx_channel)
inline

Definition at line 413 of file bgp_xmpp_channel.h.

Here is the call graph for this function:

◆ FillPeerInfo()

void BgpXmppChannelManager::FillPeerInfo ( const BgpXmppChannel channel) const
private

Definition at line 3237 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ FindChannel() [1/2]

BgpXmppChannel * BgpXmppChannelManager::FindChannel ( const XmppChannel channel)

Definition at line 3140 of file bgp_xmpp_channel.cc.

◆ FindChannel() [2/2]

BgpXmppChannel* BgpXmppChannelManager::FindChannel ( std::string  client)

◆ get_subscription_gen_id()

uint64_t BgpXmppChannelManager::get_subscription_gen_id ( )
inline

Definition at line 444 of file bgp_xmpp_channel.h.

◆ GetQueueSize()

size_t BgpXmppChannelManager::GetQueueSize ( ) const

Definition at line 3080 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ IdentifierUpdateCallback()

void BgpXmppChannelManager::IdentifierUpdateCallback ( Ip4Address  old_identifier)

Definition at line 3103 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ increment_deleting_count()

void BgpXmppChannelManager::increment_deleting_count ( )
inline

Definition at line 435 of file bgp_xmpp_channel.h.

◆ IsReadyForDeletion()

bool BgpXmppChannelManager::IsReadyForDeletion ( )

Definition at line 3072 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ name_cbegin()

const_name_iterator BgpXmppChannelManager::name_cbegin ( ) const
inline

Definition at line 394 of file bgp_xmpp_channel.h.

◆ name_cend()

const_name_iterator BgpXmppChannelManager::name_cend ( ) const
inline

Definition at line 397 of file bgp_xmpp_channel.h.

◆ name_clower_bound()

const_name_iterator BgpXmppChannelManager::name_clower_bound ( const std::string &  name) const
inline

Definition at line 400 of file bgp_xmpp_channel.h.

◆ NumUpPeer()

uint32_t BgpXmppChannelManager::NumUpPeer ( ) const
inline

Definition at line 429 of file bgp_xmpp_channel.h.

◆ RemoveChannel()

void BgpXmppChannelManager::RemoveChannel ( XmppChannel channel)

Definition at line 3148 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ RoutingInstanceCallback()

void BgpXmppChannelManager::RoutingInstanceCallback ( std::string  vrf_name,
int  op 
)

Definition at line 3109 of file bgp_xmpp_channel.cc.

◆ SetQueueDisable()

void BgpXmppChannelManager::SetQueueDisable ( bool  disabled)

Definition at line 3076 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

◆ VisitChannels() [1/2]

void BgpXmppChannelManager::VisitChannels ( BgpXmppChannelManager::VisitorFn  fn)

Definition at line 3116 of file bgp_xmpp_channel.cc.

◆ VisitChannels() [2/2]

void BgpXmppChannelManager::VisitChannels ( BgpXmppChannelManager::VisitorFn  fn) const

Definition at line 3123 of file bgp_xmpp_channel.cc.

◆ xmpp_server() [1/2]

XmppServer* BgpXmppChannelManager::xmpp_server ( )
inline

Definition at line 442 of file bgp_xmpp_channel.h.

◆ xmpp_server() [2/2]

const XmppServer* BgpXmppChannelManager::xmpp_server ( ) const
inline

Definition at line 443 of file bgp_xmpp_channel.h.

◆ XmppHandleChannelEvent()

void BgpXmppChannelManager::XmppHandleChannelEvent ( XmppChannel channel,
xmps::PeerState  state 
)
virtual

Definition at line 3163 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ BgpXmppChannelManagerMock

friend class BgpXmppChannelManagerMock
friend

Definition at line 454 of file bgp_xmpp_channel.h.

◆ BgpXmppUnitTest

friend class BgpXmppUnitTest
friend

Definition at line 455 of file bgp_xmpp_channel.h.

Member Data Documentation

◆ admin_down_listener_id_

int BgpXmppChannelManager::admin_down_listener_id_
private

Definition at line 466 of file bgp_xmpp_channel.h.

◆ asn_listener_id_

int BgpXmppChannelManager::asn_listener_id_
private

Definition at line 467 of file bgp_xmpp_channel.h.

◆ bgp_server_

BgpServer* BgpXmppChannelManager::bgp_server_
private

Definition at line 460 of file bgp_xmpp_channel.h.

◆ channel_map_

XmppChannelMap BgpXmppChannelManager::channel_map_
private

Definition at line 463 of file bgp_xmpp_channel.h.

◆ channel_name_map_

XmppChannelNameMap BgpXmppChannelManager::channel_name_map_
private

Definition at line 464 of file bgp_xmpp_channel.h.

◆ deleting_count_

tbb::atomic<int32_t> BgpXmppChannelManager::deleting_count_
private

Definition at line 470 of file bgp_xmpp_channel.h.

◆ dscp_listener_id_

int BgpXmppChannelManager::dscp_listener_id_
private

Definition at line 469 of file bgp_xmpp_channel.h.

◆ id_

int BgpXmppChannelManager::id_
private

Definition at line 465 of file bgp_xmpp_channel.h.

◆ identifier_listener_id_

int BgpXmppChannelManager::identifier_listener_id_
private

Definition at line 468 of file bgp_xmpp_channel.h.

◆ mutex_

tbb::mutex BgpXmppChannelManager::mutex_
mutableprivate

Definition at line 462 of file bgp_xmpp_channel.h.

◆ queue_

WorkQueue<BgpXmppChannel *> BgpXmppChannelManager::queue_
private

Definition at line 461 of file bgp_xmpp_channel.h.

◆ subscription_gen_id_

tbb::atomic<uint64_t> BgpXmppChannelManager::subscription_gen_id_
private

Definition at line 472 of file bgp_xmpp_channel.h.

◆ xmpp_server_

XmppServer* BgpXmppChannelManager::xmpp_server_
private

Definition at line 459 of file bgp_xmpp_channel.h.


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