diff options
Diffstat (limited to 'TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp')
-rw-r--r-- | TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp new file mode 100644 index 00000000000..6eddcc6653c --- /dev/null +++ b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp @@ -0,0 +1,60 @@ +// -*- C++ -*- + +#include "test_i.h" + +ACE_RCSID (Request_Interceptor_Flow, + test_i, + "$Id$") + +test_i::test_i (CORBA::ORB_ptr orb) + : orb_ (CORBA::ORB::_duplicate (orb)) +{ +} + +void +test_i::client_test (Test::TestScenario scenario) +{ + switch (scenario) + { + case 1: + case 4: + // Both the client-side and server-side tests throw this + // exception in these scenarios. + throw Test::X (); // Expected test exception + case 2: + case 3: + break; + default: + throw Test::UnknownScenario (scenario); // Unexpected! + } +} + +void +test_i::server_test (Test::TestScenario scenario, + CORBA::ULongSeq_out myseq) +{ + myseq = new CORBA::ULongSeq; + + switch (scenario) + { + case 1: + case 4: + // Both the client-side and server-side tests throw this + // exception in these scenarios. + throw Test::X (); // Expected test exception + case 2: + case 3: + break; + default: + throw Test::UnknownScenario (scenario); // Unexpected! + } +} + +void +test_i::shutdown (void) +{ + ACE_DEBUG ((LM_INFO, + "Server is shutting down.\n")); + + this->orb_->shutdown (0); +} |