173 |
private ORB orb; |
private ORB orb; |
174 |
|
|
175 |
/** |
/** |
176 |
|
* The encoding, used to send the message. |
177 |
|
* |
178 |
|
* The default encoding is inherited from the set IOR |
179 |
|
* (that string reference can be encoded in either Big or |
180 |
|
* Little endian). If the IOR encoding is not known |
181 |
|
* (for example, by obtaining the reference from the naming |
182 |
|
* service), the Big Endian is used. |
183 |
|
*/ |
184 |
|
private boolean Big_endian = true; |
185 |
|
|
186 |
|
/** |
187 |
* Set the IOR data, sufficient to find the invocation target. |
* Set the IOR data, sufficient to find the invocation target. |
188 |
|
* This also sets default endian encoding for invocations. |
189 |
* |
* |
190 |
* @see IOR.parse(String) |
* @see IOR.parse(String) |
191 |
*/ |
*/ |
192 |
public void setIor(IOR an_ior) |
public void setIor(IOR an_ior) |
193 |
{ |
{ |
194 |
ior = an_ior; |
ior = an_ior; |
195 |
|
setBigEndian(ior.Big_Endian); |
196 |
} |
} |
197 |
|
|
198 |
/** |
/** |
214 |
} |
} |
215 |
|
|
216 |
/** |
/** |
217 |
|
* Set the encoding that will be used to send the message. |
218 |
|
* The default encoding is inherited from the set IOR |
219 |
|
* (that string reference can be encoded in either Big or |
220 |
|
* Little endian). If the IOR encoding is not known |
221 |
|
* (for example, by obtaining the reference from the naming |
222 |
|
* service), the Big Endian is used. |
223 |
|
* |
224 |
|
* @param use_big_endian true to use the Big Endian, false |
225 |
|
* to use the Little Endian encoding. |
226 |
|
*/ |
227 |
|
public void setBigEndian(boolean use_big_endian) |
228 |
|
{ |
229 |
|
Big_endian = use_big_endian; |
230 |
|
} |
231 |
|
|
232 |
|
/** |
233 |
* The the method name to invoke. |
* The the method name to invoke. |
234 |
* |
* |
235 |
* @param operation the method name. |
* @param operation the method name. |
250 |
m_parameter_buffer.setVersion(ior.Internet.version); |
m_parameter_buffer.setVersion(ior.Internet.version); |
251 |
m_parameter_buffer.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); |
m_parameter_buffer.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); |
252 |
m_parameter_buffer.setOrb(orb); |
m_parameter_buffer.setOrb(orb); |
253 |
|
m_parameter_buffer.setBigEndian(Big_endian); |
254 |
return m_parameter_buffer; |
return m_parameter_buffer; |
255 |
} |
} |
256 |
|
|
605 |
{ |
{ |
606 |
gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); |
gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); |
607 |
|
|
608 |
|
header.setBigEndian(Big_endian); |
609 |
|
|
610 |
// The byte order will be Big Endian by default. |
// The byte order will be Big Endian by default. |
611 |
header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; |
header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; |
612 |
header.version = useVersion(ior.Internet.version); |
header.version = useVersion(ior.Internet.version); |
623 |
request_part.setVersion(header.version); |
request_part.setVersion(header.version); |
624 |
request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); |
request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); |
625 |
request_part.setOrb(orb); |
request_part.setOrb(orb); |
626 |
|
request_part.setBigEndian(header.isBigEndian()); |
627 |
|
|
628 |
// This also sets the stream encoding to the encoding, specified |
// This also sets the stream encoding to the encoding, specified |
629 |
// in the header. |
// in the header. |