38 |
|
|
39 |
package gnu.CORBA.GIOP.v1_2; |
package gnu.CORBA.GIOP.v1_2; |
40 |
|
|
41 |
import gnu.CORBA.CDR.cdrInput; |
import gnu.CORBA.Minor; |
42 |
import gnu.CORBA.CDR.cdrOutput; |
import gnu.CORBA.CDR.AbstractCdrInput; |
43 |
|
import gnu.CORBA.CDR.AbstractCdrOutput; |
44 |
import gnu.CORBA.GIOP.ServiceContext; |
import gnu.CORBA.GIOP.ServiceContext; |
45 |
import gnu.CORBA.GIOP.cxCodeSet; |
import gnu.CORBA.GIOP.CodeSetServiceContext; |
46 |
|
|
47 |
import java.io.IOException; |
import java.io.IOException; |
48 |
|
|
59 |
public class RequestHeader |
public class RequestHeader |
60 |
extends gnu.CORBA.GIOP.v1_0.RequestHeader |
extends gnu.CORBA.GIOP.v1_0.RequestHeader |
61 |
{ |
{ |
62 |
|
/** |
63 |
|
* Use serialVersionUID for interoperability. |
64 |
|
*/ |
65 |
|
private static final long serialVersionUID = 1; |
66 |
|
|
67 |
/** |
/** |
68 |
* Indicates that the object is addressed by the object key. |
* Indicates that the object is addressed by the object key. |
69 |
*/ |
*/ |
95 |
*/ |
*/ |
96 |
public RequestHeader() |
public RequestHeader() |
97 |
{ |
{ |
98 |
service_context = new ServiceContext[] { cxCodeSet.STANDARD }; |
service_context = new ServiceContext[] { CodeSetServiceContext.STANDARD }; |
99 |
} |
} |
100 |
|
|
101 |
/** |
/** |
129 |
* |
* |
130 |
* @param in a stream to read from. |
* @param in a stream to read from. |
131 |
*/ |
*/ |
132 |
public void read(cdrInput in) |
public void read(AbstractCdrInput in) |
133 |
{ |
{ |
134 |
try |
try |
135 |
{ |
{ |
156 |
throw new NO_IMPLEMENT("Object addressing by by IOR addressing info"); |
throw new NO_IMPLEMENT("Object addressing by by IOR addressing info"); |
157 |
|
|
158 |
default : |
default : |
159 |
throw new MARSHAL("Unknow addressing method in request, " + |
MARSHAL m = new MARSHAL("Unknow addressing method in request, " + |
160 |
AddressingDisposition |
AddressingDisposition |
161 |
); |
); |
162 |
|
m.minor = Minor.UnsupportedAddressing; |
163 |
|
throw m; |
164 |
} |
} |
165 |
|
|
166 |
operation = in.read_string(); |
operation = in.read_string(); |
167 |
service_context = gnu.CORBA.GIOP.ServiceContext.readSequence(in); |
service_context = gnu.CORBA.GIOP.ServiceContext.readSequence(in); |
168 |
|
|
169 |
// No requesting principal in this new format. |
// No requesting principal in this new format. |
170 |
in.setCodeSet(cxCodeSet.find(service_context)); |
in.setCodeSet(CodeSetServiceContext.find(service_context)); |
171 |
} |
} |
172 |
catch (IOException ex) |
catch (IOException ex) |
173 |
{ |
{ |
174 |
MARSHAL t = new MARSHAL(); |
MARSHAL t = new MARSHAL(); |
175 |
|
t.minor = Minor.Header; |
176 |
t.initCause(ex); |
t.initCause(ex); |
177 |
throw t; |
throw t; |
178 |
} |
} |
195 |
* |
* |
196 |
* @param out a stream to write into. |
* @param out a stream to write into. |
197 |
*/ |
*/ |
198 |
public void write(cdrOutput out) |
public void write(AbstractCdrOutput out) |
199 |
{ |
{ |
200 |
out.write_ulong(request_id); |
out.write_ulong(request_id); |
201 |
|
|
217 |
ServiceContext.writeSequence(out, service_context); |
ServiceContext.writeSequence(out, service_context); |
218 |
|
|
219 |
// No requesting principal in this new format. |
// No requesting principal in this new format. |
220 |
out.setCodeSet(cxCodeSet.find(service_context)); |
out.setCodeSet(CodeSetServiceContext.find(service_context)); |
221 |
} |
} |
222 |
} |
} |