diff options
Diffstat (limited to 'trunk/TAO/docs/tutorials/Quoter/On_Demand_Activation/Handler_i.cpp')
-rw-r--r-- | trunk/TAO/docs/tutorials/Quoter/On_Demand_Activation/Handler_i.cpp | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/trunk/TAO/docs/tutorials/Quoter/On_Demand_Activation/Handler_i.cpp b/trunk/TAO/docs/tutorials/Quoter/On_Demand_Activation/Handler_i.cpp new file mode 100644 index 00000000000..1167c78c3e0 --- /dev/null +++ b/trunk/TAO/docs/tutorials/Quoter/On_Demand_Activation/Handler_i.cpp @@ -0,0 +1,82 @@ +// +// $Id$ +// + +#include "Handler_i.h" +#include "ace/streams.h" + +Single_Query_Stock_Handler_i:: + Single_Query_Stock_Handler_i (int *response_count) + : response_count_ (response_count) +{ +} + +void +Single_Query_Stock_Handler_i::get_price_and_names (CORBA::Double ami_return_val, + const char *symbol, + const char *full_name) + throw (CORBA::SystemException) +{ + cout << "The price of one stock in \"" + << full_name << "\" (" << symbol << ") is " + << ami_return_val << endl; + (*this->response_count_)++; +} + +void +Single_Query_Stock_Handler_i:: + get_price_and_names_excep (::Messaging::ExceptionHolder *) + throw (CORBA::SystemException) +{ + // We ignore the exception, but this counts as a reponse, otherwise + // the application would not finish. + cerr << "Exception raised while querying stock price" + << endl; + (*this->response_count_)++; +} + + +void +Single_Query_Stock_Handler_i::get_symbol (const char *) + throw (CORBA::SystemException) +{ + throw CORBA::NO_IMPLEMENT (); +} + +void +Single_Query_Stock_Handler_i:: + get_symbol_excep (::Messaging::ExceptionHolder *) + throw (CORBA::SystemException) +{ + throw CORBA::NO_IMPLEMENT (); +} + +void +Single_Query_Stock_Handler_i::get_full_name (const char *) + throw (CORBA::SystemException) +{ + throw CORBA::NO_IMPLEMENT (); +} + +void +Single_Query_Stock_Handler_i:: + get_full_name_excep (::Messaging::ExceptionHolder *) + throw (CORBA::SystemException) +{ + throw CORBA::NO_IMPLEMENT (); +} + +void +Single_Query_Stock_Handler_i::price (double) + throw (CORBA::SystemException) +{ + throw CORBA::NO_IMPLEMENT (); +} + +void +Single_Query_Stock_Handler_i:: + price_excep (::Messaging::ExceptionHolder *) + throw (CORBA::SystemException) +{ + throw CORBA::NO_IMPLEMENT (); +} |