class Engine : public anna::app::Component {
public:
+ /**
+ * Sets the base protocol codec engine used internally
+ *
+ * @param baseProtocolCodecEngine This will be used internally during invokation of @readCEA, @readDPA and @readDWA on servers,
+ * and also used during base protocol messages tracing (if debug traces are enabled). You could provide NULL but you must be
+ * sure that neither of the former situations are going to happen or an exception will be thrown. It is recommended to register
+ * a codec engine pointed to a base protocol stack (you can use the files 'avps_ietf.xml' and 'commands_baseProtocol.xml'
+ * located on ANNA suite project under 'source/diameter/stack/setups', or perhaps you can create your own dictionary from
+ * file or directly with the dictionay creation API. Even you can use a greater dictionary (application dictionary), the
+ * only condition is that must contain the resources to build base protocol messages. You could provide this in engine constructor,
+ * but don't forget it.
+ */
+ void setBaseProtocolCodecEngine(codec::Engine *baseProtocolCodecEngine) throw() { a_baseProtocolCodecEngine = baseProtocolCodecEngine; }
+
+ /**
+ * Gets the base protocol codec engine used internally
+ *
+ * @see setBaseProtocolCodecEngine
+ */
+ codec::Engine * getBaseProtocolCodecEngine() const throw() { return a_baseProtocolCodecEngine; }
+
/**
Diameter application node realm name (used to be the site domain name).
protected:
/**
Constructor.
+
@param className Component class name
+ @param baseProtocolCodecEngine This will be used internally during invokation of @readCEA, @readDPA and @readDWA on servers,
+ and also used during base protocol messages tracing (if debug traces are enabled). You could provide NULL but you must be
+ sure that neither of the former situations are going to happen or an exception will be thrown. It is recommended to register
+ a codec engine pointed to a base protocol stack (you can use the files 'avps_ietf.xml' and 'commands_baseProtocol.xml'
+ located on ANNA suite project under 'source/diameter/stack/setups', or perhaps you can create your own dictionary from
+ file or directly with the dictionay creation API. Even you can use a greater dictionary (application dictionary), the
+ only condition is that must contain the resources to build base protocol messages. You could use @setBaseProtocolCodecEngine
+ to set this reference later; don't forget it.
*/
- Engine(const char *className);
+ Engine(const char *className, codec::Engine *baseProtocolCodecEngine);
// INTERNAL CREATORS AND CLOSE METHODS
private:
+ // Internal use: tracing and readCEA/DPA/DWA
+ codec::Engine *a_baseProtocolCodecEngine;
+
std::string a_realm;
std::string a_host;
bool a_autoBind;