summaryrefslogtreecommitdiff
path: root/TAO/examples/CSD_Strategy/ThreadPool3/Foo_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/CSD_Strategy/ThreadPool3/Foo_i.cpp')
-rw-r--r--TAO/examples/CSD_Strategy/ThreadPool3/Foo_i.cpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/TAO/examples/CSD_Strategy/ThreadPool3/Foo_i.cpp b/TAO/examples/CSD_Strategy/ThreadPool3/Foo_i.cpp
new file mode 100644
index 00000000000..426b75936a0
--- /dev/null
+++ b/TAO/examples/CSD_Strategy/ThreadPool3/Foo_i.cpp
@@ -0,0 +1,66 @@
+// $Id$
+#include "Foo_i.h"
+#include "OrbShutdownTask.h"
+
+
+Foo_i::Foo_i(unsigned num_clients)
+ : value_(0),
+ num_clients_(num_clients)
+{
+}
+
+
+Foo_i::~Foo_i()
+{
+}
+
+
+void
+Foo_i::op1(void)
+{
+}
+
+
+void
+Foo_i::op2(CORBA::Long value)
+{
+ this->value_ = value;
+}
+
+
+CORBA::Long
+Foo_i::op3(void)
+{
+ return this->value_;
+}
+
+
+
+void
+Foo_i::op4(CORBA::Long value)
+{
+ this->value_ = value;
+}
+
+
+void
+Foo_i::op5(void)
+{
+ throw FooException();
+}
+
+
+void
+Foo_i::done(void)
+{
+ unsigned num_left = --this->num_clients_;
+
+ if (num_left == 0)
+ {
+ if (TheOrbShutdownTask::instance()->open(0) != 0)
+ {
+ ACE_ERROR((LM_ERROR, "(%P|%t)Foo_i::done: "
+ "failed to create orb shutdown thread.\n"));
+ }
+ }
+}