#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.
TAO::Synch_Oneway_Invocation::Synch_Oneway_Invocation | ( | CORBA::Object_ptr | otarget, | |
Profile_Transport_Resolver & | resolver, | |||
TAO_Operation_Details & | detail | |||
) |
Constructor used by TAO::Invocation_Adapter.
otarget | The original target on which this invocation was started. This is there to be passed up to its parent class. | |
resolver | The profile and transport holder. | |
detail | Operation details of the invocation on the target |
Definition at line 610 of file Synch_Invocation.cpp.
00614 : Synch_Twoway_Invocation (otarget, r, d, false) 00615 { 00616 }
Invocation_Status TAO::Synch_Oneway_Invocation::remote_oneway | ( | ACE_Time_Value * | max_wait_time | ) |
Method used by the adapter to kickstart an oneway invocation to the remote object.
Definition at line 619 of file Synch_Invocation.cpp.
References ACE_DEBUG, CORBA::COMPLETED_NO, TAO_Transport::format_queue_message(), TAO_Transport::is_connected(), LM_DEBUG, TAO_OutputCDR::message_attributes(), CORBA::OMGVMCID, TAO_Transport::out_stream(), TAO_Operation_Details::response_flags(), TAO::Profile_Transport_Resolver::stub(), CORBA::SYSTEM_EXCEPTION, TAO_debug_level, TAO::TAO_INVOKE_FAILURE, TAO::TAO_INVOKE_RESTART, TAO::TAO_INVOKE_SUCCESS, TAO_Transport::TAO_ONEWAY_REQUEST, TAO::Profile_Transport_Resolver::transport(), ACE_Countdown_Time::update(), and CORBA::USER_EXCEPTION.
00620 { 00621 ACE_Countdown_Time countdown (max_wait_time); 00622 00623 CORBA::Octet const response_flags = this->details_.response_flags (); 00624 00625 Invocation_Status s = TAO_INVOKE_FAILURE; 00626 00627 if (response_flags == CORBA::Octet (Messaging::SYNC_WITH_SERVER) || 00628 response_flags == CORBA::Octet (Messaging::SYNC_WITH_TARGET)) 00629 { 00630 s = Synch_Twoway_Invocation::remote_twoway (max_wait_time); 00631 00632 return s; 00633 } 00634 00635 #if TAO_HAS_INTERCEPTORS == 1 00636 s = this->send_request_interception (); 00637 00638 if (s != TAO_INVOKE_SUCCESS) 00639 return s; 00640 00641 try 00642 { 00643 #endif /*TAO_HAS_INTERCEPTORS */ 00644 TAO_Transport* const transport = this->resolver_.transport (); 00645 00646 if (!transport) 00647 { 00648 // Way back, we failed to find a profile we could connect to. 00649 // We've come this far only so we reach the interception points 00650 // in case they can fix things. Time to bail.... 00651 throw CORBA::TRANSIENT (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO); 00652 } 00653 00654 TAO_OutputCDR &cdr = transport->out_stream (); 00655 00656 cdr.message_attributes (this->details_.request_id (), 00657 this->resolver_.stub (), 00658 TAO_Transport::TAO_ONEWAY_REQUEST, 00659 max_wait_time); 00660 00661 this->write_header (cdr); 00662 00663 this->marshal_data (cdr); 00664 00665 countdown.update (); 00666 00667 if (transport->is_connected ()) 00668 { 00669 // We have a connected transport so we can send the message 00670 s = this->send_message (cdr, 00671 TAO_Transport::TAO_ONEWAY_REQUEST, 00672 max_wait_time); 00673 } 00674 else 00675 { 00676 if (TAO_debug_level > 4) 00677 ACE_DEBUG ((LM_DEBUG, 00678 "TAO (%P|%t) - Synch_Oneway_Invocation::" 00679 "remote_oneway, queueing message\n")); 00680 00681 if (transport->format_queue_message (cdr, max_wait_time) != 0) 00682 s = TAO_INVOKE_FAILURE; 00683 } 00684 00685 #if TAO_HAS_INTERCEPTORS == 1 00686 s = this->receive_other_interception (); 00687 } 00688 catch ( ::CORBA::Exception& ex) 00689 { 00690 PortableInterceptor::ReplyStatus const status = 00691 this->handle_any_exception (&ex); 00692 00693 if (status == PortableInterceptor::LOCATION_FORWARD || 00694 status == PortableInterceptor::TRANSPORT_RETRY) 00695 s = TAO_INVOKE_RESTART; 00696 else if (status == PortableInterceptor::SYSTEM_EXCEPTION 00697 || status == PortableInterceptor::USER_EXCEPTION) 00698 throw; 00699 } 00700 catch (...) 00701 { 00702 // Notify interceptors of non-CORBA exception, and propagate 00703 // that exception to the caller. 00704 00705 PortableInterceptor::ReplyStatus const st = 00706 this->handle_all_exception (); 00707 00708 if (st == PortableInterceptor::LOCATION_FORWARD || 00709 st == PortableInterceptor::TRANSPORT_RETRY) 00710 s = TAO_INVOKE_RESTART; 00711 else 00712 throw; 00713 } 00714 #endif /* TAO_HAS_INTERCEPTORS */ 00715 00716 return s; 00717 }