summaryrefslogtreecommitdiff
path: root/ACE/TAO/performance-tests/Callback/Callback_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/TAO/performance-tests/Callback/Callback_i.h')
-rw-r--r--ACE/TAO/performance-tests/Callback/Callback_i.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/ACE/TAO/performance-tests/Callback/Callback_i.h b/ACE/TAO/performance-tests/Callback/Callback_i.h
new file mode 100644
index 00000000000..11a5655f7a2
--- /dev/null
+++ b/ACE/TAO/performance-tests/Callback/Callback_i.h
@@ -0,0 +1,43 @@
+// $Id$
+
+#ifndef TAO_CALLBACK_I_H
+#define TAO_CALLBACK_I_H
+
+#include "callbackS.h"
+#include "ace/Sample_History.h"
+
+/// Implement the Test::Callback interface
+class Callback_i : public POA_Test::Callback
+{
+public:
+ /// Constructor.
+ Callback_i (int expected_samples);
+
+ /// Return 1 when all the samples have been received
+ int done (void);
+
+ /// Get access to the history
+ ACE_Sample_History &sample_history (void);
+
+ /// Implement the CORBA methods
+ //@{
+ void response (Test::TimeStamp,
+ const Test::Payload &);
+ //@}
+
+private:
+ /// Synchronize access to the history data during testing
+ TAO_SYNCH_MUTEX mutex_;
+
+ /// Save the history of the latency values
+ ACE_Sample_History history_;
+
+ /// The number of samples still expected
+ int remaining_samples_;
+};
+
+#if defined(__ACE_INLINE__)
+#include "Callback_i.inl"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_CALLBACK_I_H */