summaryrefslogtreecommitdiff
path: root/TAO/tests/Big_Request_Muxing/Payload_Receiver.h
blob: 1aa87ca3735be6128600b3d9419a79ff5126bf8b (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
35
36
//
// $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)
    ACE_THROW_SPEC ((CORBA::SystemException));

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

  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 */