summaryrefslogtreecommitdiff
path: root/TAO/tests/Big_Request_Muxing/Payload_Receiver.h
blob: b401d89d9a87043b719e7ab166917fb13d3e1b66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// $Id$
//

#ifndef BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H
#define BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H
#include /**/ "ace/pre.h"

#include "TestS.h"

/// Implement the Test::Payload_Receiver interface
/**
 * Simply print count how many bytes were received.
 */
class Payload_Receiver
  : public virtual POA_Test::Payload_Receiver
{
public:
  Payload_Receiver ();

  // = The skeleton methods
  virtual void more_data (const Test::Payload &payload);

  virtual void sync_none_more_data (const Test::Payload &payload);

  int count(bool sync_none = false) const;

private:
  ACE_Atomic_Op<TAO_SYNCH_MUTEX, int> message_count_;
  ACE_Atomic_Op<TAO_SYNCH_MUTEX, int> sync_none_message_count_;
};

#include /**/ "ace/post.h"
#endif /* BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H */