40 |
|
|
41 |
import gnu.CORBA.CDR.cdrBufInput; |
import gnu.CORBA.CDR.cdrBufInput; |
42 |
import gnu.CORBA.CDR.cdrBufOutput; |
import gnu.CORBA.CDR.cdrBufOutput; |
|
import gnu.CORBA.GIOP.CloseMessage; |
|
43 |
import gnu.CORBA.GIOP.MessageHeader; |
import gnu.CORBA.GIOP.MessageHeader; |
44 |
import gnu.CORBA.GIOP.ReplyHeader; |
import gnu.CORBA.GIOP.ReplyHeader; |
45 |
import gnu.CORBA.GIOP.RequestHeader; |
import gnu.CORBA.GIOP.RequestHeader; |
51 |
import org.omg.CORBA.Any; |
import org.omg.CORBA.Any; |
52 |
import org.omg.CORBA.BAD_INV_ORDER; |
import org.omg.CORBA.BAD_INV_ORDER; |
53 |
import org.omg.CORBA.Bounds; |
import org.omg.CORBA.Bounds; |
54 |
|
import org.omg.CORBA.CompletionStatus; |
55 |
import org.omg.CORBA.Context; |
import org.omg.CORBA.Context; |
56 |
import org.omg.CORBA.ContextList; |
import org.omg.CORBA.ContextList; |
57 |
import org.omg.CORBA.Environment; |
import org.omg.CORBA.Environment; |
65 |
import org.omg.CORBA.SystemException; |
import org.omg.CORBA.SystemException; |
66 |
import org.omg.CORBA.TypeCode; |
import org.omg.CORBA.TypeCode; |
67 |
import org.omg.CORBA.UnknownUserException; |
import org.omg.CORBA.UnknownUserException; |
|
import org.omg.CORBA.UserException; |
|
68 |
|
|
69 |
import java.io.IOException; |
import java.io.IOException; |
70 |
import java.io.InputStream; |
import java.io.InputStream; |
212 |
} |
} |
213 |
|
|
214 |
/** |
/** |
215 |
|
* Used when redirecting request to another target. |
216 |
|
*/ |
217 |
|
gnuRequest redirected; |
218 |
|
|
219 |
|
/** |
220 |
* Get the IOR data, sufficient to find the invocation target. |
* Get the IOR data, sufficient to find the invocation target. |
221 |
* |
* |
222 |
* @return the IOR data. |
* @return the IOR data. |
749 |
{ |
{ |
750 |
MARSHAL m = |
MARSHAL m = |
751 |
new MARSHAL("Unable to open a socket at " + ior.Internet.host + ":" + |
new MARSHAL("Unable to open a socket at " + ior.Internet.host + ":" + |
752 |
ior.Internet.port |
ior.Internet.port, 10000 + ior.Internet.port, |
753 |
|
CompletionStatus.COMPLETED_NO |
754 |
); |
); |
755 |
m.initCause(io_ex); |
m.initCause(io_ex); |
756 |
throw m; |
throw m; |
841 |
// The stream must be aligned sinve v1.2, but only once. |
// The stream must be aligned sinve v1.2, but only once. |
842 |
boolean align = response.header.version.since_inclusive(1, 2); |
boolean align = response.header.version.since_inclusive(1, 2); |
843 |
|
|
|
boolean moved_permanently = false; |
|
|
|
|
844 |
switch (rh.reply_status) |
switch (rh.reply_status) |
845 |
{ |
{ |
846 |
case ReplyHeader.NO_EXCEPTION : |
case ReplyHeader.NO_EXCEPTION : |
928 |
} |
} |
929 |
catch (IOException ex) |
catch (IOException ex) |
930 |
{ |
{ |
931 |
throw new MARSHAL(ex + " while reading the forwarding info"); |
new MARSHAL("Cant read forwarding info", 5103, |
932 |
|
CompletionStatus.COMPLETED_NO |
933 |
|
); |
934 |
} |
} |
935 |
|
|
936 |
setIor(forwarded); |
setIor(forwarded); |
940 |
return; |
return; |
941 |
|
|
942 |
default : |
default : |
943 |
throw new MARSHAL("Unknow reply status: " + rh.reply_status); |
throw new MARSHAL("Unknow reply status", 8100 + rh.reply_status, |
944 |
|
CompletionStatus.COMPLETED_NO |
945 |
|
); |
946 |
} |
} |
947 |
} |
} |
948 |
|
|
954 |
* |
* |
955 |
* @throws MARSHAL if the attempt to write the parameters has failde. |
* @throws MARSHAL if the attempt to write the parameters has failde. |
956 |
*/ |
*/ |
957 |
private void write_parameter_buffer(MessageHeader header, |
protected void write_parameter_buffer(MessageHeader header, |
958 |
cdrBufOutput request_part |
cdrBufOutput request_part |
959 |
) |
) |
960 |
throws MARSHAL |
throws MARSHAL |
961 |
{ |
{ |
962 |
try |
try |
963 |
{ |
{ |
981 |
* |
* |
982 |
* @throws MARSHAL if the attempt to write the parameters has failde. |
* @throws MARSHAL if the attempt to write the parameters has failde. |
983 |
*/ |
*/ |
984 |
private void write_parameters(MessageHeader header, cdrBufOutput request_part) |
protected void write_parameters(MessageHeader header, |
985 |
throws MARSHAL |
cdrBufOutput request_part |
986 |
|
) |
987 |
|
throws MARSHAL |
988 |
{ |
{ |
989 |
// Align after 1.2, but only once. |
// Align after 1.2, but only once. |
990 |
boolean align = header.version.since_inclusive(1, 2); |
boolean align = header.version.since_inclusive(1, 2); |
1011 |
} |
} |
1012 |
catch (Bounds ex) |
catch (Bounds ex) |
1013 |
{ |
{ |
1014 |
throw new MARSHAL("Unable to write method arguments to CDR output."); |
InternalError ierr = new InternalError(); |
1015 |
|
ierr.initCause(ex); |
1016 |
|
throw ierr; |
1017 |
} |
} |
1018 |
} |
} |
1019 |
} |
} |