Add CEA on server session configuration for services
[anna.git] / include / anna / diameter.comm / LocalServer.hpp
index 03308b1..2416e8c 100644 (file)
@@ -67,8 +67,8 @@ class LocalServer {
   // Statistics
   int a_processing_time__StatisticConceptId; // request from local server (dpr's, etc.)
   int a_received_message_size__StatisticConceptId;
-  anna::statistics::Accumulator a_statisticsAccumulator;
-  void initializeStatisticConcepts() throw();
+  anna::statistics::Accumulator *a_statisticsAccumulator;
+  void initializeStatisticResources() throw();
   void resetStatistics() throw();
 
 //   void eraseServerSession(const anna::comm::ClientSocket& clientSocket) throw();
@@ -143,6 +143,14 @@ public:
   */
   void setDescription(const std::string description) throw() { a_description = description; }
 
+  /**
+     Set timeout to consider failed a request.
+     \param v Requests class code.
+     \param millisecond Milliseconds wait before considering the requests failed.
+
+     Timers are internally managed and automatically activated.
+  */
+  void setClassCodeTimeout(const ClassCode::_v v, const anna::Millisecond & millisecond) throw();
 
   /**
      Sets the server socket optional category
@@ -175,9 +183,14 @@ public:
   */
   void setEngine(Engine *e) throw() { a_engine = e; }
 
-
   // getters
 
+  /**
+  * Gets the diameter::comm::Engine
+  * @return Diameter::comm::Engine
+  */
+  Engine *getEngine() const throw() { return a_engine; }
+
   /**
   * Gets the local server key
   * @return LocalServer key
@@ -354,6 +367,14 @@ protected:
   */
   virtual void eventPeerShutdown(const ServerSession* serverSession) throw();
 
+  /**
+     Handler about a request retransmission over the server-session.
+     Default implementation traces warning event
+     \param serverSession ServerSession from which retransmission happened
+     \param request Retransmitted request message
+  */
+  virtual void eventRequestRetransmission(const ServerSession* serverSession, Message *request) throw();
+
   /**
      Handler for diameter client responses
 
@@ -399,4 +420,3 @@ protected:
 }
 
 #endif
-