#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) |
This class inherits from twoway invocation for the following reasons
Definition at line 137 of file Synch_Invocation.h.
|
Constructor used by TAO::Invocation_Adapter.
Definition at line 600 of file Synch_Invocation.cpp. References CORBA::Object_ptr.
00604 : Synch_Twoway_Invocation (otarget, r, d, false) 00605 { 00606 } |
|
Method used by the adapter to kickstart an oneway invocation to the remote object. Definition at line 609 of file Synch_Invocation.cpp. References ACE_DEBUG, TAO_Transport::format_queue_message(), TAO::Invocation_Base::handle_all_exception(), TAO::Invocation_Base::handle_any_exception(), TAO::Remote_Invocation::init_target_spec(), TAO::Invocation_Status, TAO_Transport::is_connected(), LM_DEBUG, TAO::Remote_Invocation::marshal_data(), TAO_OutputCDR::message_attributes(), CORBA::Octet, TAO_Transport::out_stream(), TAO::Invocation_Base::receive_other_interception(), PortableInterceptor::ReplyStatus, TAO_Operation_Details::response_flags(), TAO::Remote_Invocation::send_message(), TAO::Invocation_Base::send_request_interception(), TAO::Profile_Transport_Resolver::stub(), TAO_debug_level, TAO::TAO_INVOKE_FAILURE, TAO::TAO_INVOKE_RESTART, TAO::TAO_INVOKE_SUCCESS, TAO::Profile_Transport_Resolver::transport(), ACE_Countdown_Time::update(), and TAO::Remote_Invocation::write_header(). Referenced by TAO::Invocation_Adapter::invoke_oneway().
00610 { 00611 ACE_Countdown_Time countdown (max_wait_time); 00612 00613 CORBA::Octet const response_flags = this->details_.response_flags (); 00614 00615 Invocation_Status s = TAO_INVOKE_FAILURE; 00616 00617 if (response_flags == CORBA::Octet (Messaging::SYNC_WITH_SERVER) || 00618 response_flags == CORBA::Octet (Messaging::SYNC_WITH_TARGET)) 00619 { 00620 s = Synch_Twoway_Invocation::remote_twoway (max_wait_time); 00621 00622 return s; 00623 } 00624 00625 TAO_Target_Specification tspec; 00626 this->init_target_spec (tspec); 00627 00628 #if TAO_HAS_INTERCEPTORS == 1 00629 s = this->send_request_interception (); 00630 00631 if (s != TAO_INVOKE_SUCCESS) 00632 return s; 00633 00634 try 00635 { 00636 #endif /*TAO_HAS_INTERCEPTORS */ 00637 00638 TAO_Transport* const transport = this->resolver_.transport (); 00639 00640 TAO_OutputCDR &cdr = transport->out_stream (); 00641 00642 cdr.message_attributes (this->details_.request_id (), 00643 this->resolver_.stub (), 00644 TAO_Transport::TAO_ONEWAY_REQUEST, 00645 max_wait_time); 00646 00647 this->write_header (tspec, cdr); 00648 00649 this->marshal_data (cdr); 00650 00651 countdown.update (); 00652 00653 if (transport->is_connected ()) 00654 { 00655 // We have a connected transport so we can send the message 00656 s = this->send_message (cdr, 00657 TAO_Transport::TAO_ONEWAY_REQUEST, 00658 max_wait_time); 00659 } 00660 else 00661 { 00662 if (TAO_debug_level > 4) 00663 ACE_DEBUG ((LM_DEBUG, 00664 "TAO (%P|%t) - Synch_Oneway_Invocation::" 00665 "remote_oneway, queueing message\n")); 00666 00667 if (transport->format_queue_message (cdr, max_wait_time) != 0) 00668 s = TAO_INVOKE_FAILURE; 00669 } 00670 00671 #if TAO_HAS_INTERCEPTORS == 1 00672 s = this->receive_other_interception (); 00673 } 00674 catch ( ::CORBA::Exception& ex) 00675 { 00676 PortableInterceptor::ReplyStatus const status = 00677 this->handle_any_exception (&ex); 00678 00679 if (status == PortableInterceptor::LOCATION_FORWARD || 00680 status == PortableInterceptor::TRANSPORT_RETRY) 00681 s = TAO_INVOKE_RESTART; 00682 else if (status == PortableInterceptor::SYSTEM_EXCEPTION 00683 || status == PortableInterceptor::USER_EXCEPTION) 00684 throw; 00685 } 00686 catch (...) 00687 { 00688 // Notify interceptors of non-CORBA exception, and propagate 00689 // that exception to the caller. 00690 00691 PortableInterceptor::ReplyStatus const st = 00692 this->handle_all_exception (); 00693 00694 if (st == PortableInterceptor::LOCATION_FORWARD || 00695 st == PortableInterceptor::TRANSPORT_RETRY) 00696 s = TAO_INVOKE_RESTART; 00697 else 00698 throw; 00699 } 00700 #endif /* TAO_HAS_INTERCEPTORS */ 00701 00702 return s; 00703 } |