#include <SessionState.h>
|
| enum | State {
NEW,
LOGGING_ON,
LOGGED_ON,
LOGGING_OUT_USER_INITIATED,
LOGGING_OUT_SERVER_INITIATED,
LOGGED_OUT_POSSIBLE_AUTO_RELOGON,
LOGGED_OUT_NO_AUTO_RELOGON
} |
| | The enumeration of valid Session States.
|
| |
SessionState is a simple flyweight class that is used to track the client session status.
| void SessionState::disconnected |
( |
bool |
reconnectionPossible | ) |
|
|
inline |
If state is currently logging out due to a client request, we might get disconnected due to an error (stream closed, failure to write etc) these should not cause a reconnect even if they normally would.
- Parameters
-
| bool SessionState::logon |
( |
| ) |
|
|
inline |
Set the state to logging on, if manual logon is possible. Returns true or false depending on whether the state changed to logging on.
| void SessionState::logonResponseReceived |
( |
| ) |
|
|
inline |
Update the state to 'logged on' when the handshake you initiated completes.
| bool SessionState::logout |
( |
| ) |
|
|
inline |
Always want to allow the state to transition to LOGGING_OUT_USER_INITIATED as the user requested it (i.e. we should never disallow that). However it is possible that we should not allow the logout request to be performed if we are not in a state that would allow it (ie. we're LOGGED_OUT_POSSIBLE_AUTO_RELOGON).
- Returns
- true if logout even can be processed in this state
| void SessionState::logoutFromServerReceived |
( |
| ) |
|
|
inline |
A logout has been received from the server. Set the state to logging out which was initiated by the server.
| void SessionState::logoutResponseFromServerReceived |
( |
| ) |
|
|
inline |
The server has sent a logout response back. The resulting state is LOGGED_OUT_NO_AUTO_RELOGON.
| bool SessionState::relogon |
( |
| ) |
|
|
inline |
If we are logged out and set for autorelogon, do it
The documentation for this class was generated from the following files:
- src/main/cpp/mfclient/SessionState.h
- src/main/cpp/mfclient/SessionState.cpp