3 //=============================================================================
5 * @file Remote_Invocation.h
7 * @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
9 //=============================================================================
11 #ifndef TAO_REMOTE_INVOCATION_H
12 #define TAO_REMOTE_INVOCATION_H
14 #include /**/ "ace/pre.h"
16 #include "tao/Invocation_Base.h"
17 #include "tao/Transport.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/operation_details.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 class TAO_Operation_Details
;
28 class TAO_Target_Specification
;
33 class Profile_Transport_Resolver
;
37 * @class Remote_Invocation
39 * @brief Base class for remote invocations.
41 * This class encapsulates some of the common functionalities used by
42 * synchronous, asynchronous, DII and DSI invocations.
45 class TAO_Export Remote_Invocation
: public Invocation_Base
49 * @param otarget The original target on which this invocation
50 * was started. This is there to be passed up to its parent
53 * @param resolver The profile and transport holder.
55 * @param detail Pperation details of the invocation on the target
57 * @param response_expected Flag to indicate whether the
58 * operation encapsulated by @a op returns a response or not.
60 Remote_Invocation (CORBA::Object_ptr otarget
,
61 Profile_Transport_Resolver
&resolver
,
62 TAO_Operation_Details
&detail
,
63 bool response_expected
);
66 * @param byte_order The intended byte order for the message output
67 * stream. For use in message gateways that forward messages from
68 * sources with different byte order than the native order.
70 void _tao_byte_order (int byte_order
);
73 * Get the intended byte order for the message output stream.
74 * In case of gateway messages this could divert from the native
77 int _tao_byte_order ();
80 /// Initialize the @a spec.
81 void init_target_spec (TAO_Target_Specification
&spec
, TAO_OutputCDR
& output
);
83 /// Write the GIOP header into the stream.
84 void write_header (TAO_OutputCDR
&out_stream
);
86 /// Marshal the arguments into the stream.
87 void marshal_data (TAO_OutputCDR
&cdr
);
89 /// Write the message onto the socket
90 Invocation_Status
send_message (TAO_OutputCDR
&cdr
,
91 TAO_Message_Semantics message_semantics
,
92 ACE_Time_Value
*max_wait_time
);
96 Profile_Transport_Resolver
&resolver_
;
98 /// Intended byte order for message output stream
102 struct TAO_Export CDR_Byte_Order_Guard
106 int present_byte_order_
;
108 CDR_Byte_Order_Guard (TAO_OutputCDR
&, int);
109 ~CDR_Byte_Order_Guard ();
113 TAO_END_VERSIONED_NAMESPACE_DECL
115 #if defined (__ACE_INLINE__)
116 # include "tao/Remote_Invocation.inl"
117 #endif /* __ACE_INLINE__ */
119 #include /**/ "ace/post.h"
121 #endif /*TAO_REMOTE_INVOCATION_H*/