Multistack launcher
[anna.git] / example / diameter / launcher / Launcher.hpp
index d7e4bba..f5f1eb9 100644 (file)
@@ -50,14 +50,15 @@ class Launcher : public anna::comm::Application {
   anna::timex::Engine* a_timeEngine;
   MyCounterRecorder *a_counterRecorder;
   MyCounterRecorderClock *a_counterRecorderClock;
-  std::string a_cerPathfile;
-  std::string a_dwrPathfile;
+  std::string a_cerPathfile; // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+  std::string a_dwrPathfile; // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+  std::string a_workingNode; // this is the node name (usually equals to the Origin-Realm value
 
   // Burst feature
   int a_burstCycle;
   bool a_burstRepeat;
   bool a_burstActive;
-  std::map < int /* dummy, p.e. used for order number */, anna::diameter::comm::Message* > a_burstMessages;
+  std::map < int /* dummy, p.e. used for order number */, anna::diameter::comm::Message* > a_burstMessages; // XXXXXXXXXXXXXXXXXXXXX
   int a_burstLoadIndx;
   std::map<int, anna::diameter::comm::Message*>::const_iterator a_burstDeliveryIt;
   int a_otaRequest;
@@ -67,7 +68,7 @@ class Launcher : public anna::comm::Application {
   anna::Recycler<anna::diameter::comm::Message> a_commMessages;
 
   anna::comm::ServerSocket* a_httpServerSocket; // HTTP
-  MyLocalServer* a_diameterLocalServer; // DIAMETER
+  MyLocalServer* a_diameterLocalServer; // DIAMETER  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   void checkTimeMeasure(const char * commandLineParameter, bool optional = true) throw(anna::RuntimeException);
   void initialize() throw(anna::RuntimeException); // HTTP
   void run() throw(anna::RuntimeException);
@@ -75,22 +76,24 @@ class Launcher : public anna::comm::Application {
 public:
   Launcher();
 
-  anna::diameter::codec::Engine *getCodecEngine() const throw() { return a_codecEngine; } // XXXXXXXXXXXXXXXXX El del nodo de trabajo
+  anna::diameter::codec::Engine *getCodecEngine() const throw() { return a_codecEngine; }
+  std::string getWorkingNode() const throw() { return a_workingNode; }
+  void setWorkingNode(const std::string &node) throw() { a_workingNode = node; }
   MyCommunicator *getCommunicator() throw() { return a_communicator; }
   MyDiameterEngine* getMyDiameterEngine() const throw() { return (a_myDiameterEngine); }
-  void baseProtocolSetupAsClient() throw(anna::RuntimeException);
-  MyDiameterEntity *getEntity() throw() { return a_entity; }
-  MyLocalServer* getDiameterLocalServer() throw() { return a_diameterLocalServer; }
+  void baseProtocolSetupAsClient(void) throw(anna::RuntimeException);
+  MyDiameterEntity *getEntity() throw() { return a_entity; } // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+  MyLocalServer* getDiameterLocalServer() throw() { return a_diameterLocalServer; } // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   void eventOperation(const std::string &, std::string &) throw(anna::RuntimeException);
   bool logEnabled() const throw() { return (((a_logFile == "") || (a_logFile == "null")) ? false : true); }
-  void writeLogFile(const anna::DataBlock & db, const std::string &logExtension, const std::string &detail, anna::diameter::codec::Engine *codecEngine) const throw();
-  void writeLogFile(const anna::diameter::codec::Message & decodedMessage, const std::string &logExtension, const std::string &detail) const throw();
+  void writeLogFile(const anna::DataBlock & db, const std::string &logExtension, const std::string &detail) const throw(); // XXXXXXXXXXXXXXXXXXXXX
+  void writeLogFile(const anna::diameter::codec::Message & decodedMessage, const std::string &logExtension, const std::string &detail) const throw(); // XXXXXXXXXXXXXXXXXX
   void writeBurstLogFile(const std::string &buffer) throw();
   bool burstLogEnabled() const throw() { return (((a_burstLogFile == "") || (a_burstLogFile == "null")) ? false : true); }
-  void startDiameterServer(int) throw(anna::RuntimeException);
+  void startDiameterServer(int) throw(anna::RuntimeException); // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   void forceCountersRecord() throw(anna::RuntimeException) { if (a_counterRecorderClock) a_counterRecorderClock->tick(); }
 
-  anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
+  anna::xml::Node* asXML(anna::xml::Node* parent) const throw(); // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   void resetStatistics() throw() { a_myDiameterEngine->resetStatistics(); }
   void resetCounters() throw();
   void signalUSR2() throw(anna::RuntimeException);