Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / DIOP / UDP_i.cpp
blobdd8e91c847bde39f502797897b148684b5f6e71e
1 #include "UDP_i.h"
3 // Constructor
4 UDP_i::UDP_i (CORBA::ORB_ptr o) :
5 orb_(CORBA::ORB::_duplicate (o))
9 // Destructor
10 UDP_i::~UDP_i ()
14 void
15 UDP_i::invoke (const char * client_name,
16 UDP_ptr udpHandler,
17 CORBA::Long request_id)
19 try
21 ACE_DEBUG ((LM_DEBUG,
22 "UDP_i::invoke: name = %C request id = %d.\n",
23 client_name,
24 request_id));
26 CORBA::Long last_request_id = 0;
27 if (request_id_table_.find (client_name,
28 last_request_id) != -1)
30 if (last_request_id + 1 != request_id)
31 ACE_ERROR ((LM_ERROR,
32 "UDP_i::invoke: failure on %C expected id = %d, got %d\n",
33 client_name,
34 last_request_id+1,
35 request_id));
38 request_id_table_.rebind (client_name,
39 request_id);
41 if (!CORBA::is_nil (udpHandler))
43 udpHandler->invoke (client_name,
44 UDP::_nil (),
45 request_id);
49 catch (const CORBA::Exception&)
51 ACE_ERROR ((LM_ERROR,
52 "UDP_i::svc: Received exception\n"));
56 // Shutdown.
58 void
59 UDP_i::shutdown ()
61 ACE_DEBUG ((LM_DEBUG,
62 "UDP_i is shutting down\n"));
64 // Instruct the ORB to shutdown.
65 this->orb_->shutdown ();