summaryrefslogtreecommitdiff
path: root/TAO/tao/Invocation.i
blob: 3d9276bae1bb8111fb0f4ba102583423b7f6e84f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
// -*- C++ -*-
//
// $Id$

ACE_INLINE IOP::ServiceContextList &
TAO_GIOP_Invocation::service_info (void)
{
  return this->op_details_.service_info	();
}

ACE_INLINE CORBA::ULong
TAO_GIOP_Invocation::request_id	(void)
{
  return this->op_details_.request_id ();
}

ACE_INLINE const char *
TAO_GIOP_Invocation::operation (void)
{
  return this->op_details_.opname ();
}

ACE_INLINE TAO_OutputCDR &
TAO_GIOP_Invocation::out_stream	(void)
{
  return this->out_stream_;
}

ACE_INLINE void
TAO_GIOP_Invocation::restart_flag (CORBA::Boolean flag)
{
  // Set the flag
  this->restart_flag_ =	flag;
}

ACE_INLINE CORBA::Object_ptr
TAO_GIOP_Invocation::forward_reference (void)
{
  return CORBA::Object::_duplicate (this->forward_reference_.in ());
}

ACE_INLINE CORBA::Boolean
TAO_GIOP_Invocation::received_location_forward (void) const
{
  return this->received_location_forward_;
}

ACE_INLINE void
TAO_GIOP_Invocation::init_inconsistent_policies (
    CORBA::Environment &ACE_TRY_ENV)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  ACE_NEW_THROW_EX (this->inconsistent_policies_,
                    CORBA::PolicyList (0),
                    CORBA::NO_MEMORY (
                      CORBA::SystemException::_tao_minor_code (
                        TAO_DEFAULT_MINOR_CODE,
                        ENOMEM),
                      CORBA::COMPLETED_NO));
}

ACE_INLINE CORBA::PolicyList *
TAO_GIOP_Invocation::get_inconsistent_policies (void)
{
  return this->inconsistent_policies_._retn ();
}

#if (TAO_HAS_RT_CORBA == 1)

ACE_INLINE TAO_Endpoint_Selection_State
TAO_GIOP_Invocation::get_endpoint_selection_state (void)
{
  return this->endpoint_selection_state_;
}

ACE_INLINE TAO_Stub *
TAO_GIOP_Invocation::get_stub (void)
{
  return this->stub_;
}

#endif /* TAO_HAS_RT_CORBA == 1 */

ACE_INLINE void
TAO_GIOP_Invocation::location_forward_i (TAO_Stub *stubobj,
                                         CORBA::Environment &ACE_TRY_ENV)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  /**
   * Add the profiles in the given stub object to the list of forward
   * profiles.
   */
  if (stubobj == 0)
    ACE_THROW (CORBA::INTERNAL ());

  // Modify the state as appropriate to include new forwarding profiles.
  this->endpoint_selector_->forward (this,
                                     stubobj->base_profiles (),
                                     ACE_TRY_ENV);
  ACE_CHECK;

  this->received_location_forward_ = 1;
}

// ****************************************************************

ACE_INLINE
TAO_GIOP_Synch_Invocation::TAO_GIOP_Synch_Invocation (
    TAO_Stub *stub,
    const char *operation,
    CORBA::ULong opname_len,
    CORBA::Boolean argument_flag,
    TAO_ORB_Core *orb_core,
    int byte_order
  )
  : TAO_GIOP_Invocation	(stub,
			 operation,
			 opname_len,
			 argument_flag,
			 orb_core,
                         byte_order),
    rd_	(orb_core,
	 this->op_details_.service_info	())
{
}

ACE_INLINE TAO_InputCDR	&
TAO_GIOP_Synch_Invocation::inp_stream (void)
{
  return this->rd_.reply_cdr ();
}

// ****************************************************************

ACE_INLINE
TAO_GIOP_Twoway_Invocation::TAO_GIOP_Twoway_Invocation (
    TAO_Stub *stub,
    const char *operation,
    CORBA::ULong opname_len,
    CORBA::Boolean argument_flag,
    TAO_ORB_Core *orb_core,
    int byte_order
  )
  : TAO_GIOP_Synch_Invocation (stub,
			       operation,
			       opname_len,
			       argument_flag,
			       orb_core,
                               byte_order)
{
}

ACE_INLINE
TAO_GIOP_Twoway_Invocation::~TAO_GIOP_Twoway_Invocation	(void)
{
}

// ****************************************************************

ACE_INLINE
TAO_GIOP_Oneway_Invocation::~TAO_GIOP_Oneway_Invocation	(void)
{
}

ACE_INLINE TAO::SyncScope
TAO_GIOP_Oneway_Invocation::sync_scope (void)
{
  return this->sync_scope_;
}

// *********************************************************************

ACE_INLINE
TAO_GIOP_Locate_Request_Invocation::
TAO_GIOP_Locate_Request_Invocation (TAO_Stub *stub,
				    TAO_ORB_Core *orb_core)
  : TAO_GIOP_Synch_Invocation (stub,
			       0,
			       0,
			       0,
			       orb_core)
{
}

ACE_INLINE
TAO_GIOP_Locate_Request_Invocation::~TAO_GIOP_Locate_Request_Invocation	(void)
{
}