5 #ifndef __XMPP_SERVER_H__
6 #define __XMPP_SERVER_H__
8 #include <boost/asio/ip/tcp.hpp>
9 #include <boost/scoped_ptr.hpp>
10 #include <tbb/reader_writer_lock.h>
24 class ShowXmppConnection;
25 class ShowXmppServerResp;
34 typedef boost::asio::ip::tcp::endpoint
Endpoint;
54 virtual bool Initialize(
short port,
bool logUVE);
80 const std::string &endpoint_name);
86 std::vector<ShowXmppConnection> *show_connection_list)
const;
XmppConnectionEndpoint * LocateConnectionEndpoint(XmppServerConnection *connection, bool &created)
void UnRegisterConnectionEvent(xmps::PeerId)
LifetimeManager * lifetime_manager()
uint32_t GetEndOfRibSendTime() const
void FillShowConnections(std::vector< ShowXmppConnection > *show_connection_list) const
void FillShowServer(ShowXmppServerResp *resp) const
virtual void InsertDeletedConnection(XmppServerConnection *connection)
tbb::reader_writer_lock connection_map_mutex_
ConnectionEventCbMap connection_event_map_
std::set< XmppServerConnection * > ConnectionSet
virtual bool Initialize(short port)
virtual bool IsPeerCloseGraceful() const
boost::function< void(XmppChannelMux *, xmps::PeerState)> ConnectionEventCb
boost::asio::ip::address IpAddress
const std::string & ServerAddr() const
DISALLOW_COPY_AND_ASSIGN(XmppServer)
boost::asio::ip::tcp::endpoint Endpoint
virtual LifetimeActor * deleter()
void SetDscpValue(uint8_t value)
void WorkQueueExitCallback(bool done)
uint32_t GetEndOfRibReceiveTime() const
bool ClearConnection(const std::string &hostname)
std::map< Endpoint, XmppServerConnection * > ConnectionMap
bool gr_helper_disable() const
bool DequeueConnection(XmppServerConnection *connection)
ConnectionEndpointMap connection_endpoint_map_
virtual SslSession * AllocSession(SslSocket *socket)
void UpdateAllConnections(uint8_t time_out)
void NotifyConnectionEvent(XmppChannelMux *, xmps::PeerState)
virtual XmppServerConnection * CreateConnection(XmppSession *session)
friend class BgpXmppBasicTest
boost::scoped_ptr< DeleteActor > deleter_
std::map< xmps::PeerId, ConnectionEventCb > ConnectionEventCbMap
boost::asio::ssl::stream< boost::asio::ip::tcp::socket > SslSocket
uint8_t dscp_value() const
virtual bool AcceptSession(TcpSession *session)
tbb::mutex endpoint_map_mutex_
virtual void InsertConnection(XmppServerConnection *connection)
ConnectionSet deleted_connection_set_
virtual void RemoveDeletedConnection(XmppServerConnection *connection)
void ClearAllConnections()
void ReleaseConnectionEndpoint(XmppServerConnection *connection)
size_t ConnectionMapSize() const
boost::scoped_ptr< LifetimeManager > lifetime_manager_
virtual void RemoveConnection(XmppServerConnection *connection)
ConnectionMap connection_map_
friend class XmppStateMachineTest
WorkQueue< XmppServerConnection * > connection_queue_
uint16_t GetGracefulRestartTime() const
void set_subcluster_name(const std::string &subcluster_name)
uint32_t GetLongLivedGracefulRestartTime() const
void set_gr_helper_disable(bool gr_helper_disable)
std::map< std::string, XmppConnectionEndpoint * > ConnectionEndpointMap
void SwapXmppConnectionMapEntries(XmppConnection *connection1, XmppConnection *connection2)
size_t GetConnectionQueueSize() const
XmppServer(EventManager *evm, const std::string &server_addr, const XmppChannelConfig *config)
size_t ConnectionCount() const
XmppConnectionEndpoint * FindConnectionEndpoint(const std::string &endpoint_name)
tbb::mutex deletion_mutex_
void SetConnectionQueueDisable(bool disabled)
size_t ConnectionEventCount() const
boost::scoped_ptr< XmppConfigUpdater > xmpp_config_updater_
bool IsGRHelperModeEnabled() const
const std::string subcluster_name() const
void RegisterConnectionEvent(xmps::PeerId, ConnectionEventCb)
std::string subcluster_name_
void CreateConfigUpdater(BgpConfigManager *config_manager)
virtual XmppServerConnection * FindConnection(Endpoint remote_endpoint)
virtual TcpSession * CreateSession()