#include "orbsvcs/SSLIOP/SSLIOP_Util.h"
#include "orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h"
#include "orbsvcs/SSLIOP/SSLIOP_Current.h"
#include "tao/ORB_Core.h"
#include "tao/debug.h"
Include dependency graph for SSLIOP_Util.cpp:
Go to the source code of this file.
Functions | |
ACE_RCSID (SSLIOP, SSLIOP_Util,"$Id:SSLIOP_Util.cpp 77188 2007-02-19 12:34:36Z johnnyw $") TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO |
|
Definition at line 4 of file SSLIOP_Util.cpp. References TAO::SSLIOP::Current::_narrow(), TAO_Pseudo_Var_T< T >::_retn(), TAO::SSLIOP::Current_ptr, TAO::SSLIOP::Current_var, TAO_Pseudo_Var_T< T >::in(), CORBA::is_nil(), TAO_ORB_Core::object_ref_table(), TAO_Object_Ref_Table::resolve_initial_reference(), TAO_BEGIN_VERSIONED_NAMESPACE_DECL, and TAO_debug_level.
00006 : SSLIOP_Util.cpp 77188 2007-02-19 12:34:36Z johnnyw $") 00007 00008 00009 #include "orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h" 00010 #include "orbsvcs/SSLIOP/SSLIOP_Current.h" 00011 00012 #include "tao/ORB_Core.h" 00013 #include "tao/debug.h" 00014 00015 00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00017 00018 TAO::SSLIOP::Current_ptr 00019 TAO::SSLIOP::Util::current (TAO_ORB_Core *orb_core) 00020 { 00021 try 00022 { 00023 // Go straight to the object_ref_table in the ORB Core to avoid 00024 // the ORB::resolve_initial_references() mechanism's complaints 00025 // about the fact that the ORB isn't fully initialized yet 00026 // (happens on the client side). 00027 CORBA::Object_var obj = 00028 orb_core->object_ref_table ().resolve_initial_reference ( 00029 "SSLIOPCurrent"); 00030 00031 TAO::SSLIOP::Current_var tao_current = 00032 TAO::SSLIOP::Current::_narrow (obj.in ()); 00033 00034 if (CORBA::is_nil (tao_current.in ())) 00035 throw CORBA::INV_OBJREF (); 00036 00037 return tao_current._retn (); 00038 } 00039 catch (const CORBA::Exception& ex) 00040 { 00041 if (TAO_debug_level > 0) 00042 ex._tao_print_exception ( 00043 "Could not resolve \"SSLIOPCurrent\" object"); 00044 00045 return 0; 00046 } 00047 00048 return 0; 00049 } |