X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter.comm%2FServer.hpp;h=8d5dea9b6c7b4fd1e7966a0b90d91d7179907c0a;hb=8a597c7ccbe2986f505fd70258e4b59ecef4166f;hp=04844849954f9033290b2e8e776e0287f2b889e9;hpb=66409396bebc1cfeb63d404f3aee8639159298d5;p=anna.git diff --git a/include/anna/diameter.comm/Server.hpp b/include/anna/diameter.comm/Server.hpp index 0484484..8d5dea9 100644 --- a/include/anna/diameter.comm/Server.hpp +++ b/include/anna/diameter.comm/Server.hpp @@ -13,14 +13,17 @@ // STL #include #include +#include +// Project #include #include - #include #include #include -#include +#include + + namespace anna { @@ -71,10 +74,8 @@ class Server { Engine *a_engine; // Statistics - int a_processing_time__StatisticConceptId; - int a_received_message_size__StatisticConceptId; - anna::statistics::Accumulator *a_statisticsAccumulator; - void initializeStatisticConcepts() throw(); + MessageStatistics a_messageStatistics; + void initializeStatisticResources() throw(); void resetStatistics() throw(); // Availability @@ -100,6 +101,9 @@ public: */ Server(int maxClientSessions = 1) : a_maxClientSessions(maxClientSessions) { initialize(); } + /** Destructor */ + virtual ~Server() {;} + /** * Add a server to the entity and create all the client-sessions configured at #setSocketsPerDiameterServer within that server. @@ -267,10 +271,10 @@ public: // Statistics - void updateProcessingTimeStatisticConcept(const double &value) throw(); - void updateReceivedMessageSizeStatisticConcept(const double &value) throw(); - int getProcessingTimeStatisticConcept() const throw() { return a_processing_time__StatisticConceptId; } - int getReceivedMessageSizeStatisticConcept() const throw() { return a_received_message_size__StatisticConceptId; } + void updateProcessingTimeStatisticConcept(const double &value, const anna::diameter::CommandId &cid) throw(); + void updateReceivedMessageSizeStatisticConcept(const double &value, const anna::diameter::CommandId &cid) throw(); +// int getProcessingTimeStatisticConcept() const throw() { return a_processing_time__StatisticConceptId; } +// int getReceivedMessageSizeStatisticConcept() const throw() { return a_received_message_size__StatisticConceptId; } protected: