2 //=============================================================================
4 * @file Locate_ResponseHandler.cpp
6 * @author Phil Mesnier <mesnier_p@ociweb>
8 //=============================================================================
10 #include "Locate_ResponseHandler.h"
12 #include "tao/Exception.h"
13 #include "tao/ORB_Core.h"
14 #include "tao/GIOP_Utils.h"
15 #include "tao/PortableServer/Root_POA.h"
16 #include "tao/Object.h"
17 #include "tao/Pluggable_Messaging_Utils.h"
18 #include "tao/TAO_Server_Request.h"
20 #if !defined (__ACE_INLINE__)
21 # include "Locate_ResponseHandler.inl"
22 #endif /* ! __ACE_INLINE__ */
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 // The pseudo-object _nil method.
27 TAO_AMH_Locate_ResponseHandler_ptr
28 TAO_AMH_Locate_ResponseHandler::_nil ()
33 TAO_AMH_Locate_ResponseHandler::TAO_AMH_Locate_ResponseHandler (
34 TAO_ServerRequest
& sr
)
35 : TAO_AMH_Response_Handler (),
36 orb_ (CORBA::ORB::_duplicate (sr
.orb()))
41 TAO_AMH_Locate_ResponseHandler::~TAO_AMH_Locate_ResponseHandler ()
46 TAO_AMH_Locate_ResponseHandler::raise_excep (const CORBA::Exception
&ex
)
48 this->_tao_rh_send_exception (ex
);
52 TAO_AMH_Locate_ResponseHandler::forward_ior (const char *ior
,
53 CORBA::Boolean is_perm
)
55 CORBA::Object_var fwd
= this->orb_
->string_to_object (ior
);
56 this->_tao_rh_send_location_forward (fwd
.in(), is_perm
);
61 TAO_AMH_Locate_ResponseHandler::_downcast (const char *)
66 TAO_AMH_Locate_ResponseHandler_ptr
67 TAO_AMH_Locate_ResponseHandler::_narrow (CORBA::Object_ptr obj
)
69 return TAO_AMH_Locate_ResponseHandler::_unchecked_narrow (obj
);
72 TAO_AMH_Locate_ResponseHandler_ptr
73 TAO_AMH_Locate_ResponseHandler::_unchecked_narrow (CORBA::Object_ptr obj
)
75 if (CORBA::is_nil (obj
))
76 return TAO_AMH_Locate_ResponseHandler::_nil ();
78 return dynamic_cast < TAO_AMH_Locate_ResponseHandler_ptr
> (obj
);
82 TAO_AMH_Locate_ResponseHandler::_interface_repository_id () const
88 TAO_END_VERSIONED_NAMESPACE_DECL