diff options
Diffstat (limited to 'ACE/TAO/tests/Big_Twoways/Peer.cpp')
-rw-r--r-- | ACE/TAO/tests/Big_Twoways/Peer.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ACE/TAO/tests/Big_Twoways/Peer.cpp b/ACE/TAO/tests/Big_Twoways/Peer.cpp new file mode 100644 index 00000000000..77c338bdb63 --- /dev/null +++ b/ACE/TAO/tests/Big_Twoways/Peer.cpp @@ -0,0 +1,47 @@ +// +// $Id$ +// +#include "Peer.h" +#include "Session.h" + +ACE_RCSID(Big_Oneways, Peer, "$Id$") + +Peer::Peer (CORBA::ORB_ptr orb) + : orb_ (CORBA::ORB::_duplicate (orb)) +{ +} + +Peer::~Peer (void) +{ +} + +Test::Session_ptr +Peer::create_session (Test::Session_Control_ptr control, + CORBA::ULong payload_size, + CORBA::ULong thread_count, + CORBA::ULong message_count, + CORBA::ULong peer_count) +{ + Session *session_impl = 0; + ACE_NEW_THROW_EX (session_impl, + Session (control, + payload_size, + thread_count, + message_count, + peer_count), + CORBA::NO_MEMORY ()); + PortableServer::ServantBase_var transfer_ownership (session_impl); + + return session_impl->_this (); +} + +void +Peer::shutdown (void) +{ + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) Peer::shutdown, waiting for threads\n")); + + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) Peer::shutdown, shutting down ORB\n")); + this->orb_->shutdown (0); +} |