#include <xmpp_state_machine.h>
|
| XmppStateMachine (XmppConnection *connection, bool active, bool auth_enabled=false, int config_hold_time=kHoldTime) |
|
| ~XmppStateMachine () |
|
void | Initialize () |
|
void | Clear () |
|
void | SetAdminState (bool down) |
|
void | OnStart (const xmsm::EvStart &event) |
|
virtual void | StartConnectTimer (int seconds) |
|
void | CancelConnectTimer () |
|
virtual void | StartOpenTimer (int seconds) |
|
void | CancelOpenTimer () |
|
int | GetConfiguredHoldTime () const |
|
virtual void | StartHoldTimer () |
|
void | CancelHoldTimer () |
|
void | ResetSession () |
|
bool | IsAuthEnabled () |
|
void | TimerErrorHandler (std::string name, std::string error) |
|
virtual void | OnSessionEvent (TcpSession *session, TcpSession::Event event) |
|
bool | PassiveOpen (XmppSession *session) |
|
void | OnMessage (XmppSession *session, const XmppStanza::XmppMessage *msg) |
|
void | ProcessMessage (XmppSession *session, const XmppStanza::XmppMessage *msg) |
|
void | OnEvent (SslSession *session, xmsm::SslHandShakeResponse) |
|
void | AssignSession () |
|
int | GetConnectTime () const |
|
void | SetHandShakeCbHandler (SslHandShakeCallbackHandler cb) |
|
SslHandShakeCallbackHandler | HandShakeCbHandler () |
|
std::string | StateName () const |
|
std::string | LastStateName () const |
|
std::string | LastStateChangeAt () const |
|
xmsm::XmState | StateType () const |
|
xmsm::XmOpenConfirmState | OpenConfirmStateType () const |
|
XmppConnection * | connection () |
|
void | set_connection (const XmppConnection *connection) |
|
void | SwapXmppConnection (XmppStateMachine *other) |
|
bool | IsActiveChannel () |
|
bool | logUVE () |
|
const char * | ChannelType () |
|
void | set_session (TcpSession *session) |
|
void | clear_session () |
|
void | DeleteSession (XmppSession *session) |
|
XmppSession * | session () |
|
void | RemoveSession () |
|
void | set_state (xmsm::XmState state) |
|
xmsm::XmState | get_state () |
|
void | set_openconfirm_state (xmsm::XmOpenConfirmState state) |
|
xmsm::XmOpenConfirmState | get_openconfirm_state () |
|
void | connect_attempts_inc () |
|
void | connect_attempts_clear () |
|
int | get_connect_attempts () const |
|
void | keepalive_count_inc () |
|
void | keepalive_count_clear () |
|
int | get_keepalive_count () const |
|
int | hold_time () const |
|
virtual int | hold_time_msecs () const |
|
void | set_hold_time (int hold_time) |
|
void | unconsumed_event (const sc::event_base &event) |
|
void | SendConnectionInfo (const std::string &event, const std::string &nextstate="") |
|
void | SendConnectionInfo (XmppConnectionInfo *info, const std::string &event, const std::string &nextstate="") |
|
void | ResurrectOldConnection (XmppConnection *connection, XmppSession *session) |
|
void | set_last_event (const std::string &event) |
|
void | update_last_event (const std::string &event) |
|
const std::string | last_event () const |
|
bool | ConnectTimerCancelled () |
|
bool | OpenTimerCancelled () |
|
bool | HoldTimerCancelled () |
|
void | AssertOnHoldTimeout () |
|
bool | HoldTimerExpired () |
|
const Timer * | hold_timer () const |
|
Definition at line 60 of file xmpp_state_machine.h.
◆ XmppStateMachine()
XmppStateMachine::XmppStateMachine |
( |
XmppConnection * |
connection, |
|
|
bool |
active, |
|
|
bool |
auth_enabled = false , |
|
|
int |
config_hold_time = kHoldTime |
|
) |
| |
◆ ~XmppStateMachine()
XmppStateMachine::~XmppStateMachine |
( |
| ) |
|
◆ AssertOnHoldTimeout()
void XmppStateMachine::AssertOnHoldTimeout |
( |
| ) |
|
◆ AssignSession()
void XmppStateMachine::AssignSession |
( |
| ) |
|
◆ CancelConnectTimer()
void XmppStateMachine::CancelConnectTimer |
( |
| ) |
|
◆ CancelHoldTimer()
void XmppStateMachine::CancelHoldTimer |
( |
| ) |
|
◆ CancelOpenTimer()
void XmppStateMachine::CancelOpenTimer |
( |
| ) |
|
◆ ChannelType()
const char * XmppStateMachine::ChannelType |
( |
| ) |
|
◆ Clear()
void XmppStateMachine::Clear |
( |
| ) |
|
◆ clear_session()
void XmppStateMachine::clear_session |
( |
| ) |
|
◆ connect_attempts_clear()
void XmppStateMachine::connect_attempts_clear |
( |
| ) |
|
|
inline |
◆ connect_attempts_inc()
void XmppStateMachine::connect_attempts_inc |
( |
| ) |
|
|
inline |
◆ connection()
◆ ConnectTimerCancelled()
bool XmppStateMachine::ConnectTimerCancelled |
( |
| ) |
|
|
inline |
◆ ConnectTimerExpired()
bool XmppStateMachine::ConnectTimerExpired |
( |
| ) |
|
|
private |
◆ DeleteSession()
void XmppStateMachine::DeleteSession |
( |
XmppSession * |
session | ) |
|
◆ DequeueEvent()
bool XmppStateMachine::DequeueEvent |
( |
boost::intrusive_ptr< const sc::event_base > |
event | ) |
|
|
private |
◆ DISALLOW_COPY_AND_ASSIGN()
◆ Enqueue()
bool XmppStateMachine::Enqueue |
( |
const sc::event_base & |
ev | ) |
|
|
private |
◆ get_connect_attempts()
int XmppStateMachine::get_connect_attempts |
( |
| ) |
const |
|
inline |
◆ get_keepalive_count()
int XmppStateMachine::get_keepalive_count |
( |
| ) |
const |
|
inline |
◆ get_openconfirm_state()
◆ get_state()
◆ GetConfiguredHoldTime()
int XmppStateMachine::GetConfiguredHoldTime |
( |
| ) |
const |
◆ GetConnectTime()
int XmppStateMachine::GetConnectTime |
( |
| ) |
const |
◆ HandShakeCbHandler()
◆ hold_time()
int XmppStateMachine::hold_time |
( |
| ) |
const |
|
inline |
◆ hold_time_msecs()
virtual int XmppStateMachine::hold_time_msecs |
( |
| ) |
const |
|
inlinevirtual |
◆ hold_timer()
const Timer* XmppStateMachine::hold_timer |
( |
| ) |
const |
|
inline |
◆ HoldTimerCancelled()
bool XmppStateMachine::HoldTimerCancelled |
( |
| ) |
|
|
inline |
◆ HoldTimerExpired()
bool XmppStateMachine::HoldTimerExpired |
( |
| ) |
|
◆ Initialize()
void XmppStateMachine::Initialize |
( |
| ) |
|
◆ IsActiveChannel()
bool XmppStateMachine::IsActiveChannel |
( |
| ) |
|
◆ IsAuthEnabled()
bool XmppStateMachine::IsAuthEnabled |
( |
| ) |
|
|
inline |
◆ keepalive_count_clear()
void XmppStateMachine::keepalive_count_clear |
( |
| ) |
|
|
inline |
◆ keepalive_count_inc()
void XmppStateMachine::keepalive_count_inc |
( |
| ) |
|
|
inline |
◆ last_event()
const std::string XmppStateMachine::last_event |
( |
| ) |
const |
|
inline |
◆ LastStateChangeAt()
string XmppStateMachine::LastStateChangeAt |
( |
| ) |
const |
◆ LastStateName()
string XmppStateMachine::LastStateName |
( |
| ) |
const |
◆ logUVE()
bool XmppStateMachine::logUVE |
( |
| ) |
|
◆ OnEvent()
◆ OnMessage()
◆ OnSessionEvent()
◆ OnStart()
◆ OpenConfirmStateType()
◆ OpenTimerCancelled()
bool XmppStateMachine::OpenTimerCancelled |
( |
| ) |
|
|
inline |
◆ OpenTimerExpired()
bool XmppStateMachine::OpenTimerExpired |
( |
| ) |
|
|
private |
◆ PassiveOpen()
bool XmppStateMachine::PassiveOpen |
( |
XmppSession * |
session | ) |
|
◆ ProcessEvent()
void XmppStateMachine::ProcessEvent |
( |
const sc::event_base & |
event | ) |
|
|
private |
◆ ProcessMessage()
◆ ProcessStreamHeaderMessage()
◆ RemoveSession()
void XmppStateMachine::RemoveSession |
( |
| ) |
|
|
inline |
◆ ResetSession()
void XmppStateMachine::ResetSession |
( |
| ) |
|
◆ ResurrectOldConnection()
◆ SendConnectionInfo() [1/2]
void XmppStateMachine::SendConnectionInfo |
( |
const std::string & |
event, |
|
|
const std::string & |
nextstate = "" |
|
) |
| |
◆ SendConnectionInfo() [2/2]
void XmppStateMachine::SendConnectionInfo |
( |
XmppConnectionInfo * |
info, |
|
|
const std::string & |
event, |
|
|
const std::string & |
nextstate = "" |
|
) |
| |
◆ session()
◆ set_connection()
void XmppStateMachine::set_connection |
( |
const XmppConnection * |
connection | ) |
|
|
inline |
◆ set_hold_time()
void XmppStateMachine::set_hold_time |
( |
int |
hold_time | ) |
|
|
inline |
◆ set_last_event()
void XmppStateMachine::set_last_event |
( |
const std::string & |
event | ) |
|
|
inline |
◆ set_openconfirm_state()
◆ set_session()
void XmppStateMachine::set_session |
( |
TcpSession * |
session | ) |
|
◆ set_state()
◆ SetAdminState()
void XmppStateMachine::SetAdminState |
( |
bool |
down | ) |
|
◆ SetHandShakeCbHandler()
◆ StartConnectTimer()
void XmppStateMachine::StartConnectTimer |
( |
int |
seconds | ) |
|
|
virtual |
◆ StartHoldTimer()
void XmppStateMachine::StartHoldTimer |
( |
| ) |
|
|
virtual |
◆ StartOpenTimer()
void XmppStateMachine::StartOpenTimer |
( |
int |
seconds | ) |
|
|
virtual |
◆ StateName()
string XmppStateMachine::StateName |
( |
| ) |
const |
◆ StateType()
◆ SwapXmppConnection()
◆ TimerErrorHandler()
void XmppStateMachine::TimerErrorHandler |
( |
std::string |
name, |
|
|
std::string |
error |
|
) |
| |
◆ unconsumed_event()
void XmppStateMachine::unconsumed_event |
( |
const sc::event_base & |
event | ) |
|
◆ update_last_event()
void XmppStateMachine::update_last_event |
( |
const std::string & |
event | ) |
|
◆ XmppStateMachineTest
friend class XmppStateMachineTest |
|
friend |
◆ attempts_
uint32_t XmppStateMachine::attempts_ |
|
private |
◆ auth_enabled_
bool XmppStateMachine::auth_enabled_ |
|
private |
◆ config_hold_time_
int XmppStateMachine::config_hold_time_ |
|
private |
◆ connect_timer_
Timer* XmppStateMachine::connect_timer_ |
|
private |
◆ connection_
◆ deleted_
bool XmppStateMachine::deleted_ |
|
private |
◆ handshake_cb_
◆ hold_time_
int XmppStateMachine::hold_time_ |
|
private |
◆ hold_timer_
Timer* XmppStateMachine::hold_timer_ |
|
private |
◆ in_dequeue_
bool XmppStateMachine::in_dequeue_ |
|
private |
◆ is_active_
bool XmppStateMachine::is_active_ |
|
private |
◆ kConnectInterval
const int XmppStateMachine::kConnectInterval = 30 |
|
static |
◆ keepalive_count_
uint32_t XmppStateMachine::keepalive_count_ |
|
private |
◆ kHoldTime
const int XmppStateMachine::kHoldTime = 90 |
|
static |
◆ kJitter
const int XmppStateMachine::kJitter = 10 |
|
static |
◆ kMaxAttempts
const int XmppStateMachine::kMaxAttempts = 4 |
|
static |
◆ kOpenTime
const int XmppStateMachine::kOpenTime = 15 |
|
static |
◆ last_event_
std::string XmppStateMachine::last_event_ |
|
private |
◆ last_event_at_
uint64_t XmppStateMachine::last_event_at_ |
|
private |
◆ last_state_
◆ mutex_
tbb::mutex XmppStateMachine::mutex_ |
|
mutableprivate |
◆ open_timer_
Timer* XmppStateMachine::open_timer_ |
|
private |
◆ openconfirm_state_
◆ server_
◆ session_
◆ state_
◆ state_since_
uint64_t XmppStateMachine::state_since_ |
|
private |
◆ work_queue_
WorkQueue<boost::intrusive_ptr<const sc::event_base> > XmppStateMachine::work_queue_ |
|
private |
The documentation for this class was generated from the following files: