3 * @author Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
4 * @author William R. Otte <wotte@dre.vanderbilt.edu>
5 * @author Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
12 #include "StockNameConsumer_i.h"
14 #include "DistributorC.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 * @class Stock_StockBroker_i
22 * @brief This class defined the Stock Broker client.
24 class Stock_StockBroker_i
25 : public virtual POA_Stock::StockBroker
32 * @param stock_name The name of the stock that the Stock Broker client is interested in.
33 * @param priority The CORBA priority of this Stock Broker client.
35 Stock_StockBroker_i (CORBA::ORB_ptr orb
,
36 Stock::StockDistributor_ptr dist
,
37 const char *stock_name
);
40 virtual ~Stock_StockBroker_i (void);
43 * Return the StockNameConsumer object created by the Constructor.
45 * @return Returns a StockNameConsumer object reference.
47 virtual ::Stock::StockNameConsumer_ptr
get_consumer_notifier ();
50 * Duplicate a StockQuoter object using the StockQuoter object reference "c" in the argument.
52 * @param c A StockQuoter object reference.
54 virtual void connect_quoter_info (::Stock::StockQuoter_ptr c
);
57 * Destroy the StockQuoter object and return it.
59 * @return Returns the destroyed StockQuoter object reference.
61 virtual ::Stock::StockQuoter_ptr
disconnect_quoter_info ();
64 * Return the StockQuoter object.
66 * @return Returns the StockQuoter object reference that has been
67 * created by connect_quoter_info ().
69 virtual ::Stock::StockQuoter_ptr
get_connection_quoter_info ();
72 * Shutdown the object and destroy the application.
74 virtual void shutdown ();
80 /// A StockQuoter object reference that is used to get detailed
81 /// stock information.
82 Stock::StockQuoter_var quoter_
;
84 /// A StockNameConsumer servant that is used to get notification of
86 Stock_StockNameConsumer_i
*consumer_
;
88 /// The distributor that we are registered with, useful for shutdown.
89 Stock::StockDistributor_var distributor_
;
93 * @class Stock_StockBrokerHome_i
94 * @brief This class defined the Stock Broker home.
96 class Stock_StockBrokerHome_i
97 : public virtual POA_Stock::StockBrokerHome
,
98 public ACE_Event_Handler
103 * Register the necessary factories and mappings with the specified orb and
104 * Create a new instance of the StockBroker object.
108 Stock_StockBrokerHome_i (CORBA::ORB_ptr orb
);
111 virtual ~Stock_StockBrokerHome_i (void);
114 * Return the StockBroker object created by the Constructor.
116 * @return The StockBroker object created by the Constructor.
118 virtual ::Stock::StockBroker_ptr
create (Stock::StockDistributor_ptr dist
,
119 const char *stock_name
);
121 virtual int handle_signal (int signum
,
126 /// The StockDistributor object created by its home.
127 Stock::StockBroker_var broker_
;
129 /// Cache a reference to the ORB.
133 #endif /* BROKERI_H_ */