本文整理汇总了C++中corba::Object_var::_validate_connection方法的典型用法代码示例。如果您正苦于以下问题:C++ Object_var::_validate_connection方法的具体用法?C++ Object_var::_validate_connection怎么用?C++ Object_var::_validate_connection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corba::Object_var
的用法示例。
在下文中一共展示了Object_var::_validate_connection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try
{
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
if (parse_args (argc, argv) != 0)
return 1;
CORBA::Object_var obj = orb->string_to_object (ior);
CORBA::PolicyList_var policies;
CORBA::Boolean result = obj->_validate_connection (policies.out());
if (result)
{
ACE_ERROR_RETURN ((LM_ERROR,
" (%P|%t) got true from _validate_connection\n"),
1);
}
}
catch (const CORBA::TRANSIENT&)
{
ACE_DEBUG ((LM_DEBUG, "Caught transient as expected\n"));
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
return 1;
}
return 0;
}
示例2: beginning
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
try
{
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
if (parse_args (argc, argv) != 0)
return 1;
CORBA::Object_var tmp = orb->string_to_object (ior);
// No remote calls, first request flag is on.
if (!first_request_flag (tmp.in ()))
{
ACE_ERROR ((LM_ERROR,
"Test FAILED at the beginning (why?)\n"));
}
// This call must issue LocateRequest message.
CORBA::PolicyList_var pl;
tmp->_validate_connection (pl.out ());
// There was a LocateRequest call, first request flag
// must be still on.
if (!first_request_flag (tmp.in ()))
{
ACE_ERROR ((LM_ERROR,
"Test FAILED after LocateRequest (bug#3676 is not fixed)!!\n"));
}
Test::Hello_var hello = Test::Hello::_narrow (tmp.in ());
if (CORBA::is_nil (hello.in ()))
{
ACE_ERROR_RETURN ((LM_DEBUG,
"Nil Test::Hello reference <%s>\n",
ior),
1);
}
CORBA::String_var the_string = hello->get_string ();
// Either _narrow or get_string issued a remote call,
// first request flag is off.
if (first_request_flag (tmp.in ()))
{
ACE_ERROR ((LM_ERROR,
"Test FAILED after normal request (why?)\n"));
}
hello->shutdown ();
orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
return 1;
}
return 0;
}