#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 |
( |
XmppConnection * |
connection, |
|
|
bool |
active, |
|
|
bool |
auth_enabled = false , |
|
|
int |
config_hold_time = kHoldTime |
|
) |
| |
XmppStateMachine::~XmppStateMachine |
( |
| ) |
|
void XmppStateMachine::AssertOnHoldTimeout |
( |
| ) |
|
void XmppStateMachine::AssignSession |
( |
| ) |
|
void XmppStateMachine::CancelConnectTimer |
( |
| ) |
|
void XmppStateMachine::CancelHoldTimer |
( |
| ) |
|
void XmppStateMachine::CancelOpenTimer |
( |
| ) |
|
const char * XmppStateMachine::ChannelType |
( |
| ) |
|
void XmppStateMachine::Clear |
( |
| ) |
|
void XmppStateMachine::clear_session |
( |
| ) |
|
void XmppStateMachine::connect_attempts_clear |
( |
| ) |
|
|
inline |
void XmppStateMachine::connect_attempts_inc |
( |
| ) |
|
|
inline |
bool XmppStateMachine::ConnectTimerCancelled |
( |
| ) |
|
|
inline |
bool XmppStateMachine::ConnectTimerExpired |
( |
| ) |
|
|
private |
void XmppStateMachine::DeleteSession |
( |
XmppSession * |
session | ) |
|
bool XmppStateMachine::DequeueEvent |
( |
boost::intrusive_ptr< const sc::event_base > |
event | ) |
|
|
private |
bool XmppStateMachine::Enqueue |
( |
const sc::event_base & |
ev | ) |
|
|
private |
int XmppStateMachine::get_connect_attempts |
( |
| ) |
const |
|
inline |
int XmppStateMachine::get_keepalive_count |
( |
| ) |
const |
|
inline |
int XmppStateMachine::GetConfiguredHoldTime |
( |
| ) |
const |
int XmppStateMachine::GetConnectTime |
( |
| ) |
const |
int XmppStateMachine::hold_time |
( |
| ) |
const |
|
inline |
virtual int XmppStateMachine::hold_time_msecs |
( |
| ) |
const |
|
inlinevirtual |
const Timer* XmppStateMachine::hold_timer |
( |
| ) |
const |
|
inline |
bool XmppStateMachine::HoldTimerCancelled |
( |
| ) |
|
|
inline |
bool XmppStateMachine::HoldTimerExpired |
( |
| ) |
|
void XmppStateMachine::Initialize |
( |
| ) |
|
bool XmppStateMachine::IsActiveChannel |
( |
| ) |
|
bool XmppStateMachine::IsAuthEnabled |
( |
| ) |
|
|
inline |
void XmppStateMachine::keepalive_count_clear |
( |
| ) |
|
|
inline |
void XmppStateMachine::keepalive_count_inc |
( |
| ) |
|
|
inline |
const std::string XmppStateMachine::last_event |
( |
| ) |
const |
|
inline |
string XmppStateMachine::LastStateChangeAt |
( |
| ) |
const |
string XmppStateMachine::LastStateName |
( |
| ) |
const |
bool XmppStateMachine::logUVE |
( |
| ) |
|
bool XmppStateMachine::OpenTimerCancelled |
( |
| ) |
|
|
inline |
bool XmppStateMachine::OpenTimerExpired |
( |
| ) |
|
|
private |
bool XmppStateMachine::PassiveOpen |
( |
XmppSession * |
session | ) |
|
void XmppStateMachine::ProcessEvent |
( |
const sc::event_base & |
event | ) |
|
|
private |
void XmppStateMachine::RemoveSession |
( |
| ) |
|
|
inline |
void XmppStateMachine::ResetSession |
( |
| ) |
|
void XmppStateMachine::SendConnectionInfo |
( |
const std::string & |
event, |
|
|
const std::string & |
nextstate = "" |
|
) |
| |
void XmppStateMachine::SendConnectionInfo |
( |
XmppConnectionInfo * |
info, |
|
|
const std::string & |
event, |
|
|
const std::string & |
nextstate = "" |
|
) |
| |
void XmppStateMachine::set_connection |
( |
const XmppConnection * |
connection | ) |
|
|
inline |
void XmppStateMachine::set_hold_time |
( |
int |
hold_time | ) |
|
|
inline |
void XmppStateMachine::set_last_event |
( |
const std::string & |
event | ) |
|
|
inline |
void XmppStateMachine::set_session |
( |
TcpSession * |
session | ) |
|
void XmppStateMachine::SetAdminState |
( |
bool |
down | ) |
|
void XmppStateMachine::StartConnectTimer |
( |
int |
seconds | ) |
|
|
virtual |
void XmppStateMachine::StartHoldTimer |
( |
| ) |
|
|
virtual |
void XmppStateMachine::StartOpenTimer |
( |
int |
seconds | ) |
|
|
virtual |
string XmppStateMachine::StateName |
( |
| ) |
const |
void XmppStateMachine::TimerErrorHandler |
( |
std::string |
name, |
|
|
std::string |
error |
|
) |
| |
void XmppStateMachine::unconsumed_event |
( |
const sc::event_base & |
event | ) |
|
void XmppStateMachine::update_last_event |
( |
const std::string & |
event | ) |
|
friend class XmppStateMachineTest |
|
friend |
uint32_t XmppStateMachine::attempts_ |
|
private |
bool XmppStateMachine::auth_enabled_ |
|
private |
int XmppStateMachine::config_hold_time_ |
|
private |
Timer* XmppStateMachine::connect_timer_ |
|
private |
bool XmppStateMachine::deleted_ |
|
private |
int XmppStateMachine::hold_time_ |
|
private |
Timer* XmppStateMachine::hold_timer_ |
|
private |
bool XmppStateMachine::in_dequeue_ |
|
private |
bool XmppStateMachine::is_active_ |
|
private |
const int XmppStateMachine::kConnectInterval = 30 |
|
static |
uint32_t XmppStateMachine::keepalive_count_ |
|
private |
const int XmppStateMachine::kHoldTime = 90 |
|
static |
const int XmppStateMachine::kJitter = 10 |
|
static |
const int XmppStateMachine::kMaxAttempts = 4 |
|
static |
const int XmppStateMachine::kOpenTime = 15 |
|
static |
std::string XmppStateMachine::last_event_ |
|
private |
uint64_t XmppStateMachine::last_event_at_ |
|
private |
tbb::mutex XmppStateMachine::mutex_ |
|
mutableprivate |
Timer* XmppStateMachine::open_timer_ |
|
private |
uint64_t XmppStateMachine::state_since_ |
|
private |
WorkQueue<boost::intrusive_ptr<const sc::event_base> > XmppStateMachine::work_queue_ |
|
private |
The documentation for this class was generated from the following files: