summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/Basic/AdminProperties_Test.h
blob: 007dc90c5444c261c2e47b8e24a5ff3558dedfa1 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* -*- C++ -*- */
// $Id$
// ==========================================================================
//
// = FILENAME
//   AdminProperties_Test.h
//
// = DESCRIPTION
//   Test for EC Admin QoS properties.
//
// = AUTHOR
//   Pradeep Gore <pradeep@cs.wustl.edu>
//
// ==========================================================================

#ifndef ADMINPROPERTIES_TEST
#define ADMINPROPERTIES_TEST

#include "Notify_Test_Client.h"

class AdminProperties_Test : public Notify_Test_Client
{
  // = TITLE
  //   AdminProperties_Test
  //
  // = DESCRIPTION
  //   Test for Notify EC properties -
  //   max_queue_length
  //   max_consumers
  //   max_suppliers
  //   reject_new_events
  //
public:
  AdminProperties_Test (void);
  ~AdminProperties_Test (void);

  int parse_args (int argc,
                  char *argv[]) ;

  int init (int argc,
            char *argv []
            ACE_ENV_ARG_DECL);
  // Initialization.

  void run_test (ACE_ENV_SINGLE_ARG_DECL);
  // Run the test.

protected:
  void create_suppliers (ACE_ENV_SINGLE_ARG_DECL);
  void create_consumers (ACE_ENV_SINGLE_ARG_DECL);
  void send_events (ACE_ENV_SINGLE_ARG_DECL);

  // Data Members
  CosNotifyChannelAdmin::EventChannel_var ec_;
  // The one channel that we create using the factory.

  CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_;
  // The consumer admin used by consumers.

  CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_;
  // The supplier admin used by suppliers.

  CORBA::Long max_queue_length_;
  CORBA::Long max_consumers_;
  CORBA::Long max_suppliers_;
  CORBA::Boolean reject_new_events_;
  // Values for Admin Properties supplied by user.

  CORBA::Long consumers_;
  CORBA::Long suppliers_;
  // Number of consumers and suppliers to connect.

  CORBA::Long event_count_;
  // Number of events to send to the channel.
};

#endif /* ADMINPROPERTIES_TEST */