summaryrefslogtreecommitdiff
path: root/TAO/examples/Callback_Quoter/Supplier_i.h
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-15 18:58:06 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-15 18:58:06 +0000
commit6c1e330d02a739f6dc95a3a558a3d58ac646bc4f (patch)
tree35e8a8facc6510afaaec90fbd91363c1576c410a /TAO/examples/Callback_Quoter/Supplier_i.h
parentbd101ddc582f6a9ecf071b90bff24a4c72c79496 (diff)
downloadATCD-6c1e330d02a739f6dc95a3a558a3d58ac646bc4f.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO/examples/Callback_Quoter/Supplier_i.h')
-rw-r--r--TAO/examples/Callback_Quoter/Supplier_i.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/TAO/examples/Callback_Quoter/Supplier_i.h b/TAO/examples/Callback_Quoter/Supplier_i.h
new file mode 100644
index 00000000000..bf614646cbf
--- /dev/null
+++ b/TAO/examples/Callback_Quoter/Supplier_i.h
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/examples/Callback_Quoter
+//
+// = FILENAME
+// MarketFeed.h
+//
+// = DESCRIPTION
+// This class implements a simple CORBA server that keeps
+// on sending stock values to the Notifier.
+//
+// = AUTHORS
+// Kirthika Parameswaran <kirthika@cs.wustl.edu>
+//
+// ============================================================================
+
+#include "orbsvcs/Naming/Naming_Utils.h"
+#include "orbsvcs/CosNamingC.h"
+#include "NotifierC.h"
+
+class Supplier
+{
+ // = TITLE
+ // Market feed daemon implementation.
+ //
+ // = DESCRIPTION
+ // Class wrapper for a daemon which keeps sending
+ // current stock values to the Callback Quoter server.
+public:
+ // = Initialization and termination methods.
+ Supplier (void);
+ // Constructor.
+
+ ~Supplier (void);
+ // Destructor.
+
+ int run (void);
+ // Execute the daemon.
+
+ int init (int argc, char *argv[]);
+ // Initialize the client communication endpoint with Notifier.
+
+private:
+ int read_ior (char *filename);
+ // Function to read the Notifier IOR from a file.
+
+ int parse_args (void);
+ // Parses the arguments passed on the command line.
+
+ int via_naming_service(void);
+ // This method initialises the naming service and registers the
+ // object with the POA.
+
+ int send_market_status (const char *stock_name,
+ long value);
+ // Sends the stock name and its value.
+
+ int argc_;
+ // # of arguments on the command line.
+
+ char **argv_;
+ // arguments from command line.
+
+ char *ior_;
+ // IOR of the obj ref of the Notifier.
+
+ u_int feed_time;
+ // Time period between two succesive market feeds to the Notifier.
+
+ CORBA::Environment env_;
+ // Environment variable.
+
+ TAO_Naming_Client naming_services_client_;
+ // An instance of the name client used for resolving the factory
+ // objects.
+
+ int use_naming_service_;
+ // This variable denotes whether the naming service
+ // is used or not.
+
+ Notifier_var notifier_;
+ // Notifier object reference.
+
+ CORBA::ORB_var orb_;
+ // Remember our orb.
+
+ int loop_count_;
+ // Iteration count.
+};