2 * @file StockNameConsumer_i.h
4 * @author Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
5 * @author William R. Otte <wotte@dre.vanderbilt.edu>
6 * @author Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
9 #ifndef STOCKNAMECONSUMER_I_H_
10 #define STOCKNAMECONSUMER_I_H_
17 #include "tao/RTCORBA/RTCORBA.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 // Forward declaration
27 class Stock_StockBroker_i
;
30 * @class Stock_StockNameConsumer_i
31 * @brief This class is used as a callback interface used by the
32 * distributor to notify brokers of updates. This class is ALSO used as a
33 * signal handler to catch SIGINT and properly unsubscribe from the
36 class Stock_StockNameConsumer_i
:
37 public virtual POA_Stock::StockNameConsumer
43 * @param parent The parent StockBroker object reference of the StockNameConsumer object.
44 * @param stock_name The name of the stock that the parent StockBroker object need to listen to.
46 Stock_StockNameConsumer_i (Stock_StockBroker_i
&context
,
47 const char *stock_name
);
50 virtual ~Stock_StockNameConsumer_i (void);
53 * Push an event to the consumer.
55 * @param the_stockname The name of the stock that will be provided to the context StockBroker object.
57 virtual void push_StockName (::Stock::StockNames
*the_stockname
);
60 * Get the cookie attribute.
62 * @return The cookie attribute.
64 virtual ::Stock::Cookie
* cookie_ ();
67 * Set the cookie attribute.
69 * @param cookie The value of cookie attribute that need to be set.
71 virtual void cookie_ (::Stock::Cookie
*cookie
);
74 /// Context of the StockNameConsumer object.
75 Stock_StockBroker_i
&context_
;
77 /// Name of the stock to listen to.
78 CORBA::String_var stock_name_
;
80 Stock::Cookie_var cookie__
;
83 #endif /* STOCKNAMECONSUMER_I_H_ */