Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / BiDirectional / test_i.h
blob8444d669abe00dcf2d88970a047b5bc5f24d0d2a
2 //=============================================================================
3 /**
4 * @file test_i.h
6 * @author Balachandran Natarajan <bala@cs.wustl.edu>
7 */
8 //=============================================================================
11 #ifndef TAO_BIDIRECTIONAL_TEST_I_H
12 #define TAO_BIDIRECTIONAL_TEST_I_H
14 #include "testS.h"
16 /**
17 * @class Callback_i
19 * @brief A callback object to the "client"
21 * To test that the server can call the client on the same
22 * connection that was established by the client
24 class Callback_i : public POA_Callback
26 public:
27 /// ctor
28 Callback_i (CORBA::ORB_ptr orb);
30 /// Safe way to shutdown
31 void shutdown ();
33 /// The callback method
34 void callback_method ();
36 private:
37 /// The orb
38 CORBA::ORB_var orb_;
41 /**
42 * @class Simple_Server_i
44 * @brief Simpler Server implementation
46 * Implements the Simple_Server interface in test.idl
48 class Simple_Server_i : public POA_Simple_Server
50 public:
51 /// ctor
52 Simple_Server_i (CORBA::ORB_ptr orb, int no_iterations);
54 // = The Simple_Server methods.
55 CORBA::Long test_method (CORBA::Boolean do_callback);
57 void callback_object (Callback_ptr callback);
59 void shutdown ();
61 int call_client ();
63 private:
64 /// The ORB
65 CORBA::ORB_var orb_;
67 /// Flag to indicate, whether we are ready for a remote call.
68 int flag_;
70 /// Callback Object
71 Callback_var callback_;
73 /// Number of times the callback needs to be called
74 int no_iterations_;
77 #if defined(__ACE_INLINE__)
78 #include "test_i.inl"
79 #endif /* __ACE_INLINE__ */
81 #endif /* TAO_BIDIRECTIONAL_TEST_I_H */