#include <Synch_Invocation.h>
Inheritance diagram for TAO::Synch_Oneway_Invocation:
Public Member Functions | |
Synch_Oneway_Invocation (CORBA::Object_ptr otarget, Profile_Transport_Resolver &resolver, TAO_Operation_Details &detail) | |
Constructor used by TAO::Invocation_Adapter. | |
Invocation_Status | remote_oneway (ACE_Time_Value *max_wait_time) throw (CORBA::Exception) |
This class inherits from twoway invocation for the following reasons
Definition at line 150 of file Synch_Invocation.h.
|
Constructor used by TAO::Invocation_Adapter.
Definition at line 694 of file Synch_Invocation.cpp. References CORBA::Object_ptr.
00698 : Synch_Twoway_Invocation (otarget, r, d, false) 00699 { 00700 } |
|
Method used by the adapter to kickstart an oneway invocation to the remote object. Definition at line 703 of file Synch_Invocation.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHALL, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_DEBUG, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, TAO_Transport::format_queue_message(), TAO::Invocation_Status, TAO_Transport::is_connected(), LM_DEBUG, TAO_OutputCDR::message_attributes(), CORBA::Octet, TAO_Transport::out_stream(), PortableInterceptor::ReplyStatus, TAO_debug_level, TAO::TAO_INVOKE_FAILURE, TAO::TAO_INVOKE_RESTART, TAO::TAO_INVOKE_SUCCESS, and ACE_Countdown_Time::update(). Referenced by TAO::Invocation_Adapter::invoke_oneway().
00706 { 00707 ACE_Countdown_Time countdown (max_wait_time); 00708 00709 const CORBA::Octet response_flags = 00710 this->details_.response_flags (); 00711 00712 Invocation_Status s = TAO_INVOKE_FAILURE; 00713 00714 if (response_flags == CORBA::Octet (Messaging::SYNC_WITH_SERVER) || 00715 response_flags == CORBA::Octet (Messaging::SYNC_WITH_TARGET)) 00716 { 00717 s = Synch_Twoway_Invocation::remote_twoway (max_wait_time 00718 ACE_ENV_ARG_PARAMETER); 00719 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00720 00721 return s; 00722 } 00723 00724 TAO_Target_Specification tspec; 00725 this->init_target_spec (tspec ACE_ENV_ARG_PARAMETER); 00726 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00727 00728 #if TAO_HAS_INTERCEPTORS == 1 00729 s = this->send_request_interception (ACE_ENV_SINGLE_ARG_PARAMETER); 00730 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00731 00732 if (s != TAO_INVOKE_SUCCESS) 00733 return s; 00734 #endif /*TAO_HAS_INTERCEPTORS */ 00735 00736 TAO_Transport* transport = 00737 this->resolver_.transport (); 00738 00739 TAO_OutputCDR &cdr = transport->out_stream (); 00740 00741 ACE_TRY 00742 { 00743 cdr.message_attributes (this->details_.request_id (), 00744 this->resolver_.stub (), 00745 TAO_Transport::TAO_ONEWAY_REQUEST, 00746 max_wait_time); 00747 00748 this->write_header (tspec, 00749 cdr 00750 ACE_ENV_ARG_PARAMETER); 00751 ACE_TRY_CHECK; 00752 00753 this->marshal_data (cdr 00754 ACE_ENV_ARG_PARAMETER); 00755 ACE_TRY_CHECK; 00756 00757 countdown.update (); 00758 00759 if (transport->is_connected()) 00760 { 00761 // We have a connected transport so we can send the message 00762 s = this->send_message (cdr, 00763 TAO_Transport::TAO_ONEWAY_REQUEST, 00764 max_wait_time 00765 ACE_ENV_ARG_PARAMETER); 00766 ACE_TRY_CHECK; 00767 } 00768 else 00769 { 00770 if (TAO_debug_level > 4) 00771 ACE_DEBUG ((LM_DEBUG, 00772 "TAO (%P|%t) - Synch_Oneway_Invocation::" 00773 "remote_oneway, queueing message\n")); 00774 00775 if (transport->format_queue_message (cdr) != 0) 00776 s = TAO_INVOKE_FAILURE; 00777 } 00778 00779 #if TAO_HAS_INTERCEPTORS == 1 00780 s = 00781 this->receive_other_interception (ACE_ENV_SINGLE_ARG_PARAMETER); 00782 ACE_TRY_CHECK; 00783 #endif /*TAO_HAS_INTERCEPTORS */ 00784 } 00785 ACE_CATCHANY 00786 { 00787 #if TAO_HAS_INTERCEPTORS == 1 00788 PortableInterceptor::ReplyStatus status = 00789 this->handle_any_exception (&ACE_ANY_EXCEPTION 00790 ACE_ENV_ARG_PARAMETER); 00791 ACE_TRY_CHECK; 00792 00793 if (status == PortableInterceptor::LOCATION_FORWARD || 00794 status == PortableInterceptor::TRANSPORT_RETRY) 00795 s = TAO_INVOKE_RESTART; 00796 else if (status == PortableInterceptor::SYSTEM_EXCEPTION 00797 || status == PortableInterceptor::USER_EXCEPTION) 00798 #endif /*TAO_HAS_INTERCEPTORS*/ 00799 ACE_RE_THROW; 00800 } 00801 # if defined (ACE_HAS_EXCEPTIONS) \ 00802 && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) 00803 ACE_CATCHALL 00804 { 00805 #if TAO_HAS_INTERCEPTORS == 1 00806 PortableInterceptor::ReplyStatus st = 00807 this->handle_all_exception (ACE_ENV_SINGLE_ARG_PARAMETER); 00808 ACE_TRY_CHECK; 00809 00810 if (st == PortableInterceptor::LOCATION_FORWARD || 00811 st == PortableInterceptor::TRANSPORT_RETRY) 00812 s = TAO_INVOKE_RESTART; 00813 else 00814 #endif /*TAO_HAS_INTERCEPTORS == 1*/ 00815 ACE_RE_THROW; 00816 } 00817 # endif /* ACE_HAS_EXCEPTIONS && 00818 ACE_HAS_BROKEN_UNEXPECTED_EXCEPTION*/ 00819 ACE_ENDTRY; 00820 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00821 00822 return s; 00823 } |