ANNA Suite
2020b
Multipurpose development suite for Telco applications
|
#include <Session.hpp>
Classes | |
struct | OnDisconnect |
struct | SortById |
struct | State |
Public Member Functions | |
Session (const char *className, const char *timerName) | |
State::_v | getState () const |
void | setOnDisconnect (const OnDisconnect::_v onDisconnect) |
OnDisconnect::_v | getOnDisconnect () const |
virtual const std::string & | getAddress () const =0 |
virtual int | getPort () const =0 |
int | getSocketId () const |
const HopByHop & | getNextHopByHop () const |
const EndToEnd & | getNextEndToEnd () const |
void | setClassCodeTimeout (const ClassCode::_v v, const anna::Millisecond &millisecond) |
anna::Millisecond | getClassCodeTimeout (const ClassCode::_v v) const |
bool | isBound () const |
virtual const Response * | send (const Message *message) noexcept(false)=0 |
const Response * | send (const Message &message) noexcept(false) |
virtual bool | unbind (bool forceDisconnect=false) noexcept(false)=0 |
const anna::Millisecond & | getLastIncomingActivityTime () const |
const anna::Millisecond & | getLastOutgoingActivityTime () const |
int | getOTARequests () const |
bool | idle () const |
void | notifyOrphansOnExpiration (bool defer=true) |
virtual std::string | asString () const |
virtual anna::xml::Node * | asXML (anna::xml::Node *parent) const |
Public Member Functions inherited from anna::timex::Timer | |
Timer (const char *name, const Millisecond &timeout) | |
std::string | asString () const |
Public Member Functions inherited from anna::timex::TimeEvent | |
virtual | ~TimeEvent () |
Id | getId () const |
const Millisecond & | getTimeout () const |
const TimeEventObserver * | getObserver () const |
void | setId (const Id id) |
void | setTimeout (const Millisecond &timeout) |
void | setObserver (TimeEventObserver *observer) |
bool | isActive () const |
Static Public Attributes | |
static const anna::Millisecond | DefaultTimeout |
static const int | DefaultPort |
Protected Types | |
typedef anna::SortedVector< Response, SortById, HopByHop > | response_container |
typedef response_container::iterator | response_iterator |
typedef response_container::const_iterator | const_response_iterator |
Static Protected Member Functions | |
static Response * | response (response_iterator ii) |
static const Response * | response (const_response_iterator ii) |
static const char * | asText (const State::_v) |
static const char * | asText (const OnDisconnect::_v) |
Friends | |
class | anna::diameter::comm::Timer |
class | Response |
Additional Inherited Members | |
Public Types inherited from anna::timex::TimeEvent | |
typedef anna::ptrnumber | Id |
Modela la conexion realizada contra un servidor diameter.
|
protected |
|
protected |
|
protected |
anna::diameter::comm::Session::Session | ( | const char * | className, |
const char * | timerName | ||
) |
|
protected |
|
protected |
|
virtual |
Class string representation
Reimplemented from anna::timex::TimeEvent.
Reimplemented in anna::diameter::comm::ClientSession, and anna::diameter::comm::ServerSession.
|
staticprotected |
|
staticprotected |
|
virtual |
Class xml representation
parent | Parent XML node on which hold this instance information. |
Reimplemented in anna::diameter::comm::ClientSession, and anna::diameter::comm::ServerSession.
|
protected |
|
protected |
|
protectedpure virtualnoexcept |
Handler for diameter session Disconnect-Peer-Answer messages
response | Answer data block object without context match |
myNode | Own origin host |
|
protectedpure virtual |
Handler about event break connection over the session.
When notified, ANNA.diameter.comm generates an diameter::comm::ClientSession::eventResponse for every request with pending answers.
|
protectedpure virtualnoexcept |
Handler for diameter session requests
request | Request container object for corresponding diameter reception |
myNode | Own origin host |
|
protectedpure virtual |
Handler about a request retransmission over the session.
request | Message retransmitted |
|
protectedpure virtualnoexcept |
Handler for diameter session responses
response | Answer data block object for corresponding diameter request |
myNode | Own origin host |
|
protectedpure virtualnoexcept |
Handler for diameter session responses out of context
response | Answer data block object without context match |
myNode | Own origin host |
|
inlineprotectedvirtualnoexcept |
metodo que debemos re-escribir para particularizar el comportamiento de nuestra clase cuando el Engine notifica que se ha sobrepasado la duracion maxima del evento si que se invoque a ninguno de los metodos que lo cancelarian. Una vez invocado a este metodo el evento se considera cancelado y todos sus recursos son liberados automaticamente por Engine.
timeController | Controlador de tiempo asociado al evento que esta expirando. |
Implements anna::timex::TimeEvent.
|
protectedvirtual |
|
protectedvirtual |
|
inlineprotected |
|
pure virtual |
Diameter server address, ip or hostname (remote for client-session, local for server-session).
Implemented in anna::diameter::comm::ClientSession, and anna::diameter::comm::ServerSession.
|
inline |
Timeout configured for class code v requests.
|
inline |
Gets the timestamp for last incoming activity over the session.
|
inline |
Gets the timestamp for last outgoing activity over the session.
|
inline |
Returns the next end-to-end which will be used over the diameter session to send a message It is recommended to fix the message with this value (or store along with the message), for application context identification purposes
|
inline |
Returns the next hop-by-hop which will be used over the diameter session to send a message It is recommended to fix the message with this value (or store along with the message), for application context identification purposes
|
inline |
|
inline |
Gets the number of requests messages over-the-air.
|
pure virtual |
Diameter server listen port (remote for client-session, local for server-session).
Implemented in anna::diameter::comm::ClientSession, and anna::diameter::comm::ServerSession.
|
inline |
Socket id.
|
inline |
|
inline |
Returns idle state (no pending answers).
|
protectedvirtual |
Reimplemented in anna::diameter::comm::ClientSession, and anna::diameter::comm::ServerSession.
|
protected |
|
inline |
Returns true when diameter server is connected (application level) false in other case.
|
inline |
In order to avoid message burst during failover procedures (alternate server forwardings done by application), orphan request notification could be deferred to expiration event. This is the default behaviour, however if need to notice quickly the transport failure for such requets, 'false' should be established. Result code of 'OrphanTimeout' will be configured at response instance.
This only applies to client-sessions because is not usual to send request from server sessions and there wont be impact notifying orphan requests at the moment of the transport failure.
Delayed notification for orphan request due to transport failures
|
protectedpure virtualnoexcept |
Handlers
|
inlinestaticprotected |
|
inlinestaticprotected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
pure virtualnoexcept |
Implemented in anna::diameter::comm::ClientSession, and anna::diameter::comm::ServerSession.
|
protectednoexcept |
|
inline |
Set timeout to consider failed a request.
v | Requests class code. |
millisecond | Milliseconds wait before considering the requests failed. |
Timers are internally managed and automatically activated.
|
inline |
|
protectedvirtual |
|
pure virtualnoexcept |
Implemented in anna::diameter::comm::ClientSession, and anna::diameter::comm::ServerSession.
|
protectedvirtual |
|
protectedvirtual |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Default diameter port
|
static |
Default timeout for application message requests over the session.