#include <SessionState.h>
Public Types | |
enum | State { SUSPENDED, RESUMING, ATTACHED } |
States of a session. More... | |
typedef std::vector< AMQFrame > | Replay |
Public Member Functions | |
SessionState (uint32_t ackInterval, bool enableReplay=true, const framing::Uuid &id=framing::Uuid(true)) | |
Create a newly opened active session. | |
SessionState (const framing::Uuid &id=framing::Uuid(true)) | |
Create a non-resumable session. | |
const framing::Uuid & | getId () const |
State | getState () |
boost::optional< SequenceNumber > | received (const AMQFrame &) |
Received incoming L3 frame. | |
bool | sent (const AMQFrame &) |
Sent outgoing L3 frame. | |
void | receivedAck (SequenceNumber) |
Received normal incoming ack. | |
Replay | replay () |
Frames to replay. | |
void | suspend () |
Suspend the session. | |
SequenceNumber | resuming () |
Start resume protocol for the session. | |
SequenceNumber | sendingAck () |
About to send an unscheduled ack, for example, responding to a solicit-ack. | |
SequenceNumber | getLastSent () const |
SequenceNumber | getLastReceived () const |
Stores replay frames, implements session ack/resume protocols.
A SessionState is always associated with an _open_ session (attached or suspended) it is destroyed when the session is closed.
qpid::framing::SessionState::SessionState | ( | uint32_t | ackInterval, | |
bool | enableReplay = true , |
|||
const framing::Uuid & | id = framing::Uuid(true) | |||
) |
Create a newly opened active session.
ackInterval | send/solicit an ack whenever N unacknowledged frames have been received/sent. |
qpid::framing::SessionState::SessionState | ( | const framing::Uuid & | id = framing::Uuid(true) |
) |
Create a non-resumable session.
Does not store session frames, never volunteers ack or solicit-ack.
boost::optional<SequenceNumber> qpid::framing::SessionState::received | ( | const AMQFrame & | ) |
Received incoming L3 frame.
bool qpid::framing::SessionState::sent | ( | const AMQFrame & | ) |
Sent outgoing L3 frame.
void qpid::framing::SessionState::receivedAck | ( | SequenceNumber | ) |
Received normal incoming ack.
Replay qpid::framing::SessionState::replay | ( | ) |
Frames to replay.
void qpid::framing::SessionState::suspend | ( | ) |
Suspend the session.
SequenceNumber qpid::framing::SessionState::resuming | ( | ) |
Start resume protocol for the session.
SequenceNumber qpid::framing::SessionState::sendingAck | ( | ) |
About to send an unscheduled ack, for example, responding to a solicit-ack.
Note: when received() returns a sequence number, this function should not be called. SessionState assumes that the ack is sent every time received() returns a sequence number.