Merge pull request #2328 from esohns/ssl_cleanups
[ACE_TAO.git] / TAO / orbsvcs / examples / CosEC / RtEC_Based / tests / Multiple / Multiple.h
blob5f3f24a25b34a11803c63aa30d2325d7753c76c1
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Multiple.h
7 * @author Pradeep Gore <pradeep@cs.wustl.edu>
9 * This is a test class for the Cos Event Service.
11 //=============================================================================
14 #ifndef COSECMULTIPLE_H
15 #define COSECMULTIPLE_H
17 #include "orbsvcs/Naming/Naming_Client.h"
18 #include "orbsvcs/Naming/Naming_Server.h"
19 #include "orbsvcs/CosNamingC.h"
20 #include "orbsvcs/CosEventChannelAdminC.h"
22 class Multiple
24 public:
25 // = TITLE
26 // class Multiple
28 // = DESCRIPTION
29 // Base class for suppliers and consumers to send/receive events
30 // via the Cos Event Service.
31 public:
32 /// Constructor.
33 Multiple ();
35 /// Destructor.
36 virtual ~Multiple ();
38 /// Calls parse_args, Starts up an ORB, gets hold of the Event Service.
39 /// Returns 0 on success, -1 on error.
40 int init (int argc, ACE_TCHAR *argv[]);
42 /// Calls the ORB's <run> method.
43 int runORB ();
45 /// Closes down the ORB and exits.
46 void shutdown ();
48 protected:
49 /// Parse the command line arguments.
50 virtual int parse_args (int argc, ACE_TCHAR *argv []) = 0;
52 /// Reference to a running Event Service.
53 CosEventChannelAdmin::EventChannel_ptr cos_ec_;
55 /// The name with which to locate the Event Service.
56 const ACE_TCHAR *service_name_;
58 private:
59 /// initializes the ORB.
60 /// Returns 0 on success, -1 on error.
61 int init_ORB (int argc, ACE_TCHAR *argv[]);
63 /// initializes the COS EC.
64 /// Returns 0 on success, -1 on error.
65 int init_CosEC ();
67 /// The ORB that we use.
68 CORBA::ORB_var orb_;
70 /// An instance of the name client used for resolving the factory
71 /// objects.
72 TAO_Naming_Client naming_client_;
75 #endif /* COSECMULTIPLE_H */