TAO 3.1.4
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
TAO::Synch_Twoway_Invocation Class Reference

All the action for a synchronous twoway invocation happen here. More...

#include <Synch_Invocation.h>

Inheritance diagram for TAO::Synch_Twoway_Invocation:
Inheritance graph
[legend]
Collaboration diagram for TAO::Synch_Twoway_Invocation:
Collaboration graph
[legend]

Public Member Functions

 Synch_Twoway_Invocation (CORBA::Object_ptr otarget, Profile_Transport_Resolver &resolver, TAO_Operation_Details &detail, bool response_expected=true)
 Constructor used by TAO::Invocation_Adapter.
 
Invocation_Status remote_twoway (ACE_Time_Value *max_wait_time)
 
void set_retry_state (Invocation_Retry_State *retry_state)
 
- Public Member Functions inherited from TAO::Remote_Invocation
 Remote_Invocation (CORBA::Object_ptr otarget, Profile_Transport_Resolver &resolver, TAO_Operation_Details &detail, bool response_expected)
 
void _tao_byte_order (int byte_order)
 
int _tao_byte_order ()
 
- Public Member Functions inherited from TAO::Invocation_Base
virtual ~Invocation_Base ()
 
TAO_Stubstub () const
 Accessor and mutator methods.
 
CORBA::Object_ptr forwarded_reference ()
 
void forwarded_reference (CORBA::Object_ptr o)
 
TAO_Service_Contextrequest_service_context ()
 Accessors for the service context list.
 
TAO_Service_Contextreply_service_context ()
 
CORBA::Object_ptr steal_forwarded_reference ()
 Return the forwarded object location by loosing ownership.
 
CORBA::Object_ptr effective_target () const
 Return the effective target of the invocation.
 
CORBA::Object_ptr target () const
 Return the target object.
 
CORBA::Boolean response_expected () const
 Does this invocation return a response?
 
GIOP::ReplyStatusType reply_status () const
 Accessor of reply_status of the invocation.
 
void reply_status (GIOP::ReplyStatusType s)
 Mutator of reply_status of the invocation.
 
TAO_Operation_Detailsoperation_details ()
 The operaton details of the invocation.
 

Protected Member Functions

virtual Invocation_Status handle_user_exception (TAO_InputCDR &cdr)
 
Invocation_Status location_forward (TAO_InputCDR &cdr)
 Helper method used to handle location forwarded replies.
 
Invocation_Status handle_system_exception (TAO_InputCDR &cdr)
 
Invocation_Status wait_for_reply (ACE_Time_Value *max_wait_time, TAO_Synch_Reply_Dispatcher &rd, TAO_Bind_Dispatcher_Guard &bd)
 As the name suggests waits for a reply from the remote ORB.
 
- Protected Member Functions inherited from TAO::Remote_Invocation
void init_target_spec (TAO_Target_Specification &spec, TAO_OutputCDR &output)
 Initialize the spec.
 
void write_header (TAO_OutputCDR &out_stream)
 Write the GIOP header into the stream.
 
void marshal_data (TAO_OutputCDR &cdr)
 Marshal the arguments into the stream.
 
Invocation_Status send_message (TAO_OutputCDR &cdr, TAO_Message_Semantics message_semantics, ACE_Time_Value *max_wait_time)
 Write the message onto the socket.
 
- Protected Member Functions inherited from TAO::Invocation_Base
 Invocation_Base (CORBA::Object_ptr otarget, CORBA::Object_ptr target, TAO_Stub *stub, TAO_Operation_Details &op, bool response_expected, bool request_is_remote)
 

Protected Attributes

Invocation_Retry_Stateretry_state_
 
- Protected Attributes inherited from TAO::Remote_Invocation
Profile_Transport_Resolverresolver_
 Our resolver.
 
int byte_order_
 Intended byte order for message output stream.
 
- Protected Attributes inherited from TAO::Invocation_Base
TAO_Operation_Detailsdetails_
 The operation details on which we are operating on.
 
CORBA::Object_var forwarded_to_
 Forwarded object reference.
 
bool response_expected_
 Is response expected?
 
GIOP::ReplyStatusType reply_status_
 A GIOP reply status of the invocation.
 

Private Member Functions

Invocation_Status check_reply_status (TAO_Synch_Reply_Dispatcher &rd)
 

Detailed Description

All the action for a synchronous twoway invocation happen here.

An object of this type is created by TAO::Invocation_Adapter and invokes a method on this class. The method takes care of creating and sending a request, waiting for a reply and demarshalling the reply for the client.

Constructor & Destructor Documentation

◆ Synch_Twoway_Invocation()

TAO::Synch_Twoway_Invocation::Synch_Twoway_Invocation ( CORBA::Object_ptr otarget,
Profile_Transport_Resolver & resolver,
TAO_Operation_Details & detail,
bool response_expected = true )

Constructor used by TAO::Invocation_Adapter.

Parameters
otargetThe original target on which this invocation was started. This is there to be passed up to its parent class.
resolverThe profile and transport holder.
detailOperation details of the invocation on the target
response_expectedFlag to indicate whether the operation encapsulated by op returns a response or not.

Member Function Documentation

◆ check_reply_status()

Invocation_Status TAO::Synch_Twoway_Invocation::check_reply_status ( TAO_Synch_Reply_Dispatcher & rd)
private

Helper method that checks the reply status of the replies and takes appropriate action. This method returns an exception when there is an error.

◆ handle_system_exception()

Invocation_Status TAO::Synch_Twoway_Invocation::handle_system_exception ( TAO_InputCDR & cdr)
protected

Helper method used to handle system exceptions from the remote objects.

There has been a unanimous view that this is not the right way to do things. But a need to be compliant is forcing us into this.

Note
A location forwarding loop may occur where a client is bounced from the original target to the forwarded target and back if the application is not equipped to handle retries of previously called targets. TAO may be able to help in this case but it ultimately ends up being an application issue.

◆ handle_user_exception()

Invocation_Status TAO::Synch_Twoway_Invocation::handle_user_exception ( TAO_InputCDR & cdr)
protectedvirtual

This method is selectively made virtual, so that inherited classes can overload the user exception handling type. For example the DII needs a totally different method of user exception exception handling

◆ location_forward()

Invocation_Status TAO::Synch_Twoway_Invocation::location_forward ( TAO_InputCDR & cdr)
protected

Helper method used to handle location forwarded replies.

◆ remote_twoway()

Invocation_Status TAO::Synch_Twoway_Invocation::remote_twoway ( ACE_Time_Value * max_wait_time)

Method used by the adapter to kickstart an invocation to the remote object. There is a exception declaration in this method which ensures that the exceptions propagated by the remote objects are converted a CORBA exceptions for the clients. This method does a bunch of things necessary to create and send the invocation. This method is also nerve centre for the interceptor invocation points.

◆ set_retry_state()

void TAO::Synch_Twoway_Invocation::set_retry_state ( Invocation_Retry_State * retry_state)

Indicate that retry state should be tracked and controlled in the presence of exceptions.

◆ wait_for_reply()

Invocation_Status TAO::Synch_Twoway_Invocation::wait_for_reply ( ACE_Time_Value * max_wait_time,
TAO_Synch_Reply_Dispatcher & rd,
TAO_Bind_Dispatcher_Guard & bd )
protected

As the name suggests waits for a reply from the remote ORB.

This method returns an exception when there is an error.

Member Data Documentation

◆ retry_state_

Invocation_Retry_State* TAO::Synch_Twoway_Invocation::retry_state_
protected

The documentation for this class was generated from the following files: