本文整理汇总了C++中TAO_ServerRequest类的典型用法代码示例。如果您正苦于以下问题:C++ TAO_ServerRequest类的具体用法?C++ TAO_ServerRequest怎么用?C++ TAO_ServerRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TAO_ServerRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: command
void POA_Load_Balancer::Object_Group_Factory::make_random_skel (
TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall *TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::Load_Balancer::Object_Group>::ret_val retval;
TAO::SArg_Traits< char *>::in_arg_val _tao_id;
TAO::Argument * const args[] =
{
&retval,
&_tao_id
};
static size_t const nargs = 2;
POA_Load_Balancer::Object_Group_Factory * const impl =
dynamic_cast<POA_Load_Balancer::Object_Group_Factory *> (servant);
if (!impl)
{
throw ::CORBA::INTERNAL ();
}
make_random_Object_Group_Factory command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例2: receive_payload_skel
void POA_Receiver::receive_payload_skel (
TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall *TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< void>::ret_val retval;
TAO::SArg_Traits< ::Receiver::Payload>::in_arg_val _tao_pay;
TAO::Argument * const args[] =
{
&retval,
&_tao_pay
};
static size_t const nargs = 2;
POA_Receiver * const impl =
dynamic_cast<POA_Receiver *> (servant);
if (!impl)
{
throw ::CORBA::INTERNAL ();
}
receive_payload_Receiver command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例3: call_message_skel
void POA_Messenger::call_message_skel (
TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall *TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval;
TAO::SArg_Traits< char *>::in_arg_val _tao_user_name;
TAO::Argument * const args[] =
{
&retval,
&_tao_user_name
};
static size_t const nargs = 2;
POA_Messenger * const impl =
dynamic_cast<POA_Messenger *> (servant);
if (!impl)
{
throw ::CORBA::INTERNAL ();
}
call_message_Messenger command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例4: command
void POA_Test::Session_Factory::create_new_session_skel (
TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall *TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::Test::Session>::ret_val retval;
TAO::SArg_Traits< ::Test::Callback>::in_arg_val _tao_the_callback;
TAO::Argument * const args[] =
{
&retval,
&_tao_the_callback
};
static size_t const nargs = 2;
POA_Test::Session_Factory * const impl =
dynamic_cast<POA_Test::Session_Factory *> (servant);
if (!impl)
{
throw ::CORBA::INTERNAL ();
}
create_new_session_Session_Factory command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例5: sendLocation_skel
void POA_ChatRoom::sendLocation_skel (
TAO_ServerRequest & server_request,
void * TAO_INTERCEPTOR (servant_upcall),
void * servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< void>::ret_val retval;
TAO::SArg_Traits< ::CORBA::Long>::in_arg_val _tao_x;
TAO::SArg_Traits< ::CORBA::Long>::in_arg_val _tao_y;
TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_fromNickname;
TAO::Argument * const args[] =
{
&retval,
&_tao_x,
&_tao_y,
&_tao_fromNickname
};
static size_t const nargs = 4;
POA_ChatRoom * const impl =
static_cast<POA_ChatRoom *> (servant);
sendLocation_ChatRoom command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例6: command
void POA_Test::Hello::get_stringList_skel (
TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall *TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::Test::StringList>::ret_val retval;
TAO::Argument * const args[] =
{
&retval
};
static size_t const nargs = 1;
POA_Test::Hello * const impl =
dynamic_cast<POA_Test::Hello *> (servant);
if (!impl)
{
throw ::CORBA::INTERNAL ();
}
get_stringList_Hello command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例7: command
void POA_Skeleton_Inheritance::Interface_2::_get_attribute_2_skel (
TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall *TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< char *>::ret_val retval;
TAO::Argument * const args[] =
{
&retval
};
static size_t const nargs = 1;
POA_Skeleton_Inheritance::Interface_2 * const impl =
dynamic_cast<POA_Skeleton_Inheritance::Interface_2 *> (servant);
if (!impl)
{
throw ::CORBA::INTERNAL ();
}
_get_attribute_2_Interface_2 command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例8: command
void POA_ExampleInterfaces::IAdder::add_skel (
TAO_ServerRequest & server_request,
void * TAO_INTERCEPTOR (servant_upcall),
void * servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::CORBA::Double>::ret_val retval;
TAO::SArg_Traits< ::CORBA::Double>::in_arg_val _tao_arg1;
TAO::SArg_Traits< ::CORBA::Double>::in_arg_val _tao_arg2;
TAO::Argument * const args[] =
{
&retval,
&_tao_arg1,
&_tao_arg2
};
static size_t const nargs = 3;
POA_ExampleInterfaces::IAdder * const impl =
static_cast<POA_ExampleInterfaces::IAdder *> (servant);
add_IAdder command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例9: _is_a_skel
void POA_Echo::_is_a_skel (
TAO_ServerRequest & server_request,
void * TAO_INTERCEPTOR (servant_upcall),
void * servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval;
TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id;
TAO::Argument * const args[] =
{
&retval,
&_tao_repository_id
};
static size_t const nargs = 2;
POA_Echo * const impl =
static_cast<POA_Echo *> (servant);
_is_a_Echo_Upcall_Command command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例10: _component_skel
void POA_Echo::_component_skel (
TAO_ServerRequest & server_request,
void * TAO_INTERCEPTOR (servant_upcall),
void * servant
)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::CORBA::Object>::ret_val retval;
TAO::Argument * const args[] =
{
&retval
};
static size_t const nargs = 1;
POA_Echo * const impl =
static_cast<POA_Echo *> (servant);
_get_component_Echo_Upcall_Command command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例11: rh
int
TAO_Async_Table_Adapter::dispatch (TAO::ObjectKey &key,
TAO_ServerRequest &request,
CORBA::Object_out forward_to)
{
TAO_IOR_Table_Impl_var rootref;
{
ACE_GUARD_RETURN (ACE_Lock,
ace_mon,
*this->lock_,
TAO_Adapter::DS_MISMATCHED_KEY);
if (this->closed_)
{
return TAO_Adapter::DS_MISMATCHED_KEY;
}
rootref = this->root_;
}
if (this->root_->async_available ())
{
// construct a callback handler
TAO_AMH_Locate_ResponseHandler_ptr rhp;
ACE_NEW_RETURN (rhp,
TAO_AMH_Locate_ResponseHandler (request),
DS_MISMATCHED_KEY);
TAO_AMH_Locate_ResponseHandler_var rh (rhp);
this->find_object (rh, key);
return 0;
}
if (this->TAO_Table_Adapter::find_object (key, forward_to))
{
request.forward_location (forward_to);
return TAO_Adapter::DS_FORWARD;
}
else
return TAO_Adapter::DS_MISMATCHED_KEY;
}
示例12:
int
TAO_Table_Adapter::dispatch (TAO::ObjectKey &key,
TAO_ServerRequest &request,
CORBA::Object_out forward_to)
{
TAO_IOR_Table_Impl_var rootref;
{
ACE_GUARD_RETURN (ACE_Lock,
ace_mon,
*this->lock_,
TAO_Adapter::DS_MISMATCHED_KEY);
if (this->closed_)
return TAO_Adapter::DS_MISMATCHED_KEY;
rootref = this->root_;
}
if (this->find_object (key, forward_to))
{
request.forward_location (forward_to);
return TAO_Adapter::DS_FORWARD;
}
else
return TAO_Adapter::DS_MISMATCHED_KEY;
}
示例13: command
void
TAO_AMH_Skeletons::_component_amh_skel (TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall* TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< ::CORBA::Object>::ret_val retval;
TAO::Argument * const args[] =
{
&retval
};
static size_t const nargs = 1;
_get_component_amh_Upcall_Command command (
servant,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
示例14:
TAO_AMH_DSI_Response_Handler::TAO_AMH_DSI_Response_Handler (
TAO_ServerRequest & sr)
: TAO_AMH_Response_Handler (),
orb_core_ (sr.orb_core ())
{
}
示例15: if
void
TAO_DynamicImplementation::_dispatch (
TAO_ServerRequest &request,
TAO::Portable_Server::Servant_Upcall * /* context */)
{
// No need to do any of this if the client isn't waiting.
if (request.response_expected ())
{
if (request.is_forwarded ())
{
request.init_reply ();
request.tao_send_reply ();
// No need to invoke in this case.
return;
}
else if (request.sync_with_server ())
{
// The last line before the call to this function
// was an ACE_CHECK_RETURN, so if we're here, we
// know there is no exception so far, and that's all
// a SYNC_WITH_SERVER client request cares about.
request.send_no_exception_reply ();
}
}
// Create DSI request object.
CORBA::ServerRequest *dsi_request = 0;
ACE_NEW (dsi_request,
CORBA::ServerRequest (request));
try
{
// Delegate to user.
this->invoke (dsi_request);
// Only if the client is waiting.
if (request.response_expected () && !request.sync_with_server ())
{
dsi_request->dsi_marshal ();
}
}
catch (::CORBA::Exception& ex)
{
// Only if the client is waiting.
if (request.response_expected () && !request.sync_with_server ())
{
if (request.collocated ()
&& request.operation_details ()->cac () != 0)
{
// If we have a cac it will handle the exception and no
// need to do any further processing
request.operation_details ()->cac ()->handle_corba_exception (
request, &ex);
return;
}
else
request.tao_send_reply_exception (ex);
}
}
::CORBA::release (dsi_request);
}