X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.hpp;h=3ce4a207f0f75956775ca641c100cf0c131812f6;hb=a06169181968130467d2e54ac91676aecd14bcea;hp=9ac09af9e4b98b20bac6db21c75bf328cf98cc37;hpb=f9534159f3b43cbf74eccf88723ee740c69eb204;p=anna.git diff --git a/example/diameter/launcher/Launcher.hpp b/example/diameter/launcher/Launcher.hpp index 9ac09af..3ce4a20 100644 --- a/example/diameter/launcher/Launcher.hpp +++ b/example/diameter/launcher/Launcher.hpp @@ -18,6 +18,7 @@ #include #include #include +#include // Process #include @@ -42,6 +43,10 @@ namespace anna { } class TestManager; +class RealmNode; +class MyDiameterEntity; +class MyLocalServer; +class MyDiameterEngine; // RealmNode resources class RealmNode; @@ -57,8 +62,6 @@ class Launcher : public anna::comm::Application { // Core engines: MyCommunicator *a_communicator; - anna::diameter::codec::Engine *a_codecEngine; - anna::diameter::stack::Dictionary *a_baseProtocolDictionary; anna::timex::Engine* a_timeEngine; MyCounterRecorder *a_counterRecorder; anna::Millisecond a_admlMinResolution; @@ -67,6 +70,7 @@ class Launcher : public anna::comm::Application { // Nodes deployment: realm_nodes_t a_nodes; RealmNode *a_workingNode; + RealmNode *a_operatedRealm; // auxiliary for eventOperation // comm resources: anna::comm::ServerSocket* a_httpServerSocket; // HTTP @@ -80,17 +84,23 @@ class Launcher : public anna::comm::Application { public: Launcher(); + //~Launcher(); TODO void loadServices(const std::string & xmlPathFile, bool eventOperation = false) throw(anna::RuntimeException); void startServices() throw(anna::RuntimeException); - anna::diameter::codec::Engine *getCodecEngine() const throw() { return a_codecEngine; } - //anna::diameter::stack::Dictionary *getBaseProtocolDictionary() const throw() { return a_baseProtocolDictionary; } - RealmNode *getWorkingNode() const throw(anna::RuntimeException); // management operations working node - bool setWorkingNode(const std::string &name) throw(); // we could update ignoreFlagsOnValidation/integrationAndDebugging over the global codec engine - // but finally, that configuration issues will be global to the process. - - RealmNode *getRealmNode(const std::string &realmName) const throw(); + bool setWorkingNode(const std::string &name) throw(); + RealmNode *getRealmNode(const std::string &realmName) const throw(anna::RuntimeException); + RealmNode *getRealmNode(const anna::diameter::codec::Message &message) const throw(anna::RuntimeException); + bool uniqueRealm() const throw() { return (a_nodes.size() == 1); } + + // Operated realm for communication resources smart assignment //////////////////////////////////////////////////////////// + void updateOperatedRealmNodeWithMessage(const anna::diameter::codec::Message &message) throw(anna::RuntimeException); + RealmNode *getOperatedRealm() const throw(anna::RuntimeException); + MyDiameterEntity *getOperatedEntity() const throw(anna::RuntimeException); + MyLocalServer *getOperatedServer() const throw(anna::RuntimeException); + MyDiameterEngine *getOperatedEngine() const throw(anna::RuntimeException); + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// MyCommunicator *getCommunicator() throw() { return a_communicator; }