OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

typedef XmppChannelNameMap::const_iterator BgpXmppChannelManager::const_name_iterator

Definition at line 388 of file bgp_xmpp_channel.h.

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

Definition at line 389 of file bgp_xmpp_channel.h.

Definition at line 386 of file bgp_xmpp_channel.h.

Definition at line 387 of file bgp_xmpp_channel.h.

Constructor & Destructor Documentation

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 ( )
virtual

Definition at line 3057 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

Member Function Documentation

void BgpXmppChannelManager::AdminDownCallback ( )

Definition at line 3084 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

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:

BgpServer* BgpXmppChannelManager::bgp_server ( )
inline

Definition at line 441 of file bgp_xmpp_channel.h.

const XmppChannelMap& BgpXmppChannelManager::channel_map ( ) const
inline

Definition at line 412 of file bgp_xmpp_channel.h.

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:

uint32_t BgpXmppChannelManager::count ( ) const
inline

Definition at line 425 of file bgp_xmpp_channel.h.

BgpXmppChannel * BgpXmppChannelManager::CreateChannel ( XmppChannel channel)
protectedvirtual

Definition at line 3156 of file bgp_xmpp_channel.cc.

void BgpXmppChannelManager::decrement_deleting_count ( )
inline

Definition at line 436 of file bgp_xmpp_channel.h.

bool BgpXmppChannelManager::DeleteChannel ( BgpXmppChannel channel)
protectedvirtual

Definition at line 3007 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

int32_t BgpXmppChannelManager::deleting_count ( ) const
inline

Definition at line 434 of file bgp_xmpp_channel.h.

BgpXmppChannelManager::DISALLOW_COPY_AND_ASSIGN ( BgpXmppChannelManager  )
private
void BgpXmppChannelManager::DSCPUpdateCallback ( uint8_t  value)

Definition at line 3088 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

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:

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:

BgpXmppChannel * BgpXmppChannelManager::FindChannel ( const XmppChannel channel)

Definition at line 3140 of file bgp_xmpp_channel.cc.

BgpXmppChannel* BgpXmppChannelManager::FindChannel ( std::string  client)
uint64_t BgpXmppChannelManager::get_subscription_gen_id ( )
inline

Definition at line 444 of file bgp_xmpp_channel.h.

size_t BgpXmppChannelManager::GetQueueSize ( ) const

Definition at line 3080 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

void BgpXmppChannelManager::IdentifierUpdateCallback ( Ip4Address  old_identifier)

Definition at line 3103 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

void BgpXmppChannelManager::increment_deleting_count ( )
inline

Definition at line 435 of file bgp_xmpp_channel.h.

bool BgpXmppChannelManager::IsReadyForDeletion ( )

Definition at line 3072 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

const_name_iterator BgpXmppChannelManager::name_cbegin ( ) const
inline

Definition at line 394 of file bgp_xmpp_channel.h.

const_name_iterator BgpXmppChannelManager::name_cend ( ) const
inline

Definition at line 397 of file bgp_xmpp_channel.h.

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

Definition at line 400 of file bgp_xmpp_channel.h.

uint32_t BgpXmppChannelManager::NumUpPeer ( ) const
inline

Definition at line 429 of file bgp_xmpp_channel.h.

void BgpXmppChannelManager::RemoveChannel ( XmppChannel channel)

Definition at line 3148 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

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

Definition at line 3109 of file bgp_xmpp_channel.cc.

void BgpXmppChannelManager::SetQueueDisable ( bool  disabled)

Definition at line 3076 of file bgp_xmpp_channel.cc.

Here is the call graph for this function:

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

Definition at line 3116 of file bgp_xmpp_channel.cc.

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

Definition at line 3123 of file bgp_xmpp_channel.cc.

XmppServer* BgpXmppChannelManager::xmpp_server ( )
inline

Definition at line 442 of file bgp_xmpp_channel.h.

const XmppServer* BgpXmppChannelManager::xmpp_server ( ) const
inline

Definition at line 443 of file bgp_xmpp_channel.h.

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

friend class BgpXmppChannelManagerMock
friend

Definition at line 454 of file bgp_xmpp_channel.h.

friend class BgpXmppUnitTest
friend

Definition at line 455 of file bgp_xmpp_channel.h.

Member Data Documentation

int BgpXmppChannelManager::admin_down_listener_id_
private

Definition at line 466 of file bgp_xmpp_channel.h.

int BgpXmppChannelManager::asn_listener_id_
private

Definition at line 467 of file bgp_xmpp_channel.h.

BgpServer* BgpXmppChannelManager::bgp_server_
private

Definition at line 460 of file bgp_xmpp_channel.h.

XmppChannelMap BgpXmppChannelManager::channel_map_
private

Definition at line 463 of file bgp_xmpp_channel.h.

XmppChannelNameMap BgpXmppChannelManager::channel_name_map_
private

Definition at line 464 of file bgp_xmpp_channel.h.

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

Definition at line 470 of file bgp_xmpp_channel.h.

int BgpXmppChannelManager::dscp_listener_id_
private

Definition at line 469 of file bgp_xmpp_channel.h.

int BgpXmppChannelManager::id_
private

Definition at line 465 of file bgp_xmpp_channel.h.

int BgpXmppChannelManager::identifier_listener_id_
private

Definition at line 468 of file bgp_xmpp_channel.h.

tbb::mutex BgpXmppChannelManager::mutex_
mutableprivate

Definition at line 462 of file bgp_xmpp_channel.h.

WorkQueue<BgpXmppChannel *> BgpXmppChannelManager::queue_
private

Definition at line 461 of file bgp_xmpp_channel.h.

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

Definition at line 472 of file bgp_xmpp_channel.h.

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: