本文整理汇总了C++中Messenger_var::shutdown方法的典型用法代码示例。如果您正苦于以下问题:C++ Messenger_var::shutdown方法的具体用法?C++ Messenger_var::shutdown怎么用?C++ Messenger_var::shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messenger_var
的用法示例。
在下文中一共展示了Messenger_var::shutdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: policy_list
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 );
Messenger_var messenger =
Messenger::_narrow( obj.in() );
CORBA::String_var message =
CORBA::string_dup( "Terminating messenger service!" );
messenger->send_message( "Chief of Security",
"New Directive",
message.inout() );
messenger->shutdown("Chief of Security");
Security::QOP qop =
Security::SecQOPIntegrityAndConfidentiality;
CORBA::Any want_protection;
want_protection <<= qop;
CORBA::Policy_var policy =
orb->create_policy (Security::SecQOPPolicy,
want_protection);
Security::EstablishTrust establish_trust;
establish_trust.trust_in_client = 0;
establish_trust.trust_in_target = 1;
CORBA::Any want_trust;
want_trust <<= establish_trust;
CORBA::Policy_var policy2 =
orb->create_policy (Security::SecEstablishTrustPolicy,
want_trust);
CORBA::PolicyList policy_list (2);
policy_list.length (1);
policy_list[0] =
CORBA::Policy::_duplicate (policy.in ());
policy_list.length (2);
policy_list[1] =
CORBA::Policy::_duplicate (policy2.in ());
CORBA::Object_var object =
obj->_set_policy_overrides (policy_list,
CORBA::SET_OVERRIDE);
Messenger_var messenger2 =
Messenger::_narrow( object.in() );
message =
CORBA::string_dup( "Terminating messenger service!" );
messenger2->send_message( "Chief of Security",
"New Directive",
message.inout() );
messenger2->shutdown("Chief of Security");
orb->destroy();
}
catch(const CORBA::Exception& ex)
{
ex._tao_print_exception("Client: main block");
return 1;
}
return 0;
}