EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | Protected Attributes | List of all members
FDMessageRequest Class Reference

Represents a Diameter request message. More...

#include <efd.h>

Inheritance diagram for FDMessageRequest:
FDMessage

Public Member Functions

 FDMessageRequest (FDDictionaryEntryCommand *cde)
 Class constructor. Constructs a request to be sent. More...
 
 FDMessageRequest (FDDictionaryEntryCommand *cde, struct msg *pmsg)
 Class constructor. Constructs a request that has been received. More...
 
 FDMessageRequest (FDDictionaryEntryApplication *ade, FDDictionaryEntryCommand *cde)
 Class constructor. Constructs an application specific request that has been received. More...
 
virtual ~FDMessageRequest ()
 
FDMessageRequestsend ()
 Sends the request. More...
 
virtual Void processAnswer (FDMessageAnswer &ans)
 A virtual message that will process the answer message received in response to this request message. More...
 
Bool setPreserveAnswer (Bool preserve)
 Sets indication whether to preserve the answer or not. More...
 
Bool getPreserveAnswer ()
 Sets indication whether to preserve the answer or not. More...
 
- Public Member Functions inherited from FDMessage
FDDictionaryEntryCommandgetCommand ()
 
FDMessageadd (FDAvp &avp)
 Adds the contents of "avp" to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, int32_t v)
 Adds an int32_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, int64_t v)
 Adds an int64_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, uint32_t v)
 Adds an uint32_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, uint64_t v)
 Adds an uint64_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, float v)
 Adds a float value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, double v)
 Adds a double value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const char *v)
 Adds a string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const std::string &v)
 Adds a string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const char *v, size_t len)
 Adds an octet string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const uint8_t *v, size_t len)
 Adds an octet string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const ETime &v)
 Adds a time value to this message. More...
 
FDMessageadd (FDExtractor &e)
 Adds the AVP's associated with the FDExtractor object to this AVP. More...
 
FDMessageadd (FDExtractorList &el)
 Adds the AVP's associated with the FDExtractorList object to this AVP. More...
 
FDMessageadd (FDExtractorAvp &ea)
 Adds the AVP's associated with the FDExtractorAvp object to this AVP. More...
 
FDMessageadd (FDExtractorAvpList &eal)
 Adds the AVP's associated with the FDExtractorAvpList object to this AVP. More...
 
Bool get (FDDictionaryEntryAVP &de, int32_t &v)
 Retrieves the int32_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, int64_t &v)
 Retrieves the int64_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, uint32_t &v)
 Retrieves the uint32_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, uint64_t &v)
 Retrieves the uint64_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, float &v)
 Retrieves the float AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, double &v)
 Retrieves the double AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, std::string &v)
 Retrieves the string AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, char *v, size_t &len)
 Retrieves the octet string AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, uint8_t *v, size_t &len)
 Retrieves the octet string AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, ETime &v)
 Retrieves the time AVP value associated with specified dictionary entry. More...
 
FDAvp findAVP (FDDictionaryEntryAVP &de)
 Retrieves the AVP object specified by the dictionary entry from this message. More...
 
FDAvp getFirstAVP (Bool &found)
 Retrieves the first AVP object from this message. More...
 
Void dump ()
 Prints the AVP contents of this message. More...
 
Bool isRequest ()
 Indicates if this message is a request. More...
 
Bool isAnswer ()
 Indicates if this message is an answer. More...
 
struct msg * getMsg ()
 Retrieves the freeDiameter message pointer. More...
 
Void addOrigin ()
 Adds the Origin-Host and Origin-Realm to this message. More...
 
FDMessageaddJson (const char *json)
 Adds the AVP's represented in the JSON string. More...
 
FDMessageaddJson (const std::string &json)
 Adds the AVP's represented in the JSON string. More...
 
Bool getJson (std::string &json)
 Retrieves a JSON string with all of the AVP's represented in it. More...
 

Protected Attributes

ETimer m_timer
 

Additional Inherited Members

- Protected Member Functions inherited from FDMessage
 FDMessage (Bool req2ans, FDDictionaryEntryCommand *de, struct msg *pmsg=NULL, Bool dedel=false, Bool msgdel=true)
 Class constructor. More...
 
 FDMessage (FDDictionaryEntryCommand *de, struct msg *pmsg=NULL, Bool dedel=false)
 Class constructor. More...
 
 FDMessage (FDDictionaryEntryApplication *ade, FDDictionaryEntryCommand *cde, struct msg *pmsg=NULL, Bool dedel=false)
 Class constructor. More...
 
 ~FDMessage ()
 Class destructor. More...
 
FDMessagesendRequest (Void(*anscb)(Void *, struct msg **), FDMessageRequest &req)
 Sends a request message. More...
 
FDMessagesendAnswer ()
 Sends an answer message;. More...
 
Void setMsgDelete (Bool v)
 Sets value indicating if the freeDiameter message object is to be deleted when this object is destroyed. More...
 

Detailed Description

Represents a Diameter request message.

Constructor & Destructor Documentation

◆ FDMessageRequest() [1/3]

FDMessageRequest::FDMessageRequest ( FDDictionaryEntryCommand cde)

Class constructor. Constructs a request to be sent.

Parameters
cdeThe dictionary entry for the request.
Exceptions
FDException

◆ FDMessageRequest() [2/3]

FDMessageRequest::FDMessageRequest ( FDDictionaryEntryCommand cde,
struct msg *  pmsg 
)

Class constructor. Constructs a request that has been received.

Parameters
cdeThe dictionary entry for the request message.
pmsgThe underlying freeDiameter message.
Exceptions
FDException

◆ FDMessageRequest() [3/3]

FDMessageRequest::FDMessageRequest ( FDDictionaryEntryApplication ade,
FDDictionaryEntryCommand cde 
)

Class constructor. Constructs an application specific request that has been received.

Parameters
adeThe dictionary entry for the application.
cdeThe dictionary entry for the request message.
Exceptions
FDException

◆ ~FDMessageRequest()

FDMessageRequest::~FDMessageRequest ( )
virtual

Member Function Documentation

◆ getPreserveAnswer()

Bool FDMessageRequest::getPreserveAnswer ( )
inline

Sets indication whether to preserve the answer or not.

Returns
True indicates that the answer message will be preserved, otherwise False.

◆ processAnswer()

Void FDMessageRequest::processAnswer ( FDMessageAnswer ans)
virtual

A virtual message that will process the answer message received in response to this request message.

Parameters
ansA reference to the answer message.

◆ send()

FDMessageRequest & FDMessageRequest::send ( )

Sends the request.

Returns
reference to this message object.
Exceptions
FDException

◆ setPreserveAnswer()

Bool FDMessageRequest::setPreserveAnswer ( Bool  preserve)
inline

Sets indication whether to preserve the answer or not.

Returns
the current value of the perserve flag.

Member Data Documentation

◆ m_timer

ETimer FDMessageRequest::m_timer
protected

The documentation for this class was generated from the following files: