4
|
1 |
/*
|
5555
|
2 |
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
4
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
5555
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
4
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5555
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
4
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
5555
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
4
|
24 |
*/
|
|
25 |
package com.sun.org.omg.SendingContext;
|
|
26 |
|
|
27 |
|
|
28 |
/**
|
|
29 |
* com/sun/org/omg/SendingContext/_CodeBaseStub.java
|
|
30 |
* Generated by the IDL-to-Java compiler (portable), version "3.0"
|
|
31 |
* from rt.idl
|
|
32 |
* Thursday, May 6, 1999 1:52:08 AM PDT
|
|
33 |
*/
|
|
34 |
|
|
35 |
public class _CodeBaseStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.org.omg.SendingContext.CodeBase
|
|
36 |
{
|
|
37 |
// Constructors
|
|
38 |
// NOTE: If the default constructor is used, the
|
|
39 |
// object is useless until _set_delegate (...)
|
|
40 |
// is called.
|
|
41 |
public _CodeBaseStub ()
|
|
42 |
{
|
|
43 |
super ();
|
|
44 |
}
|
|
45 |
|
|
46 |
public _CodeBaseStub (org.omg.CORBA.portable.Delegate delegate)
|
|
47 |
{
|
|
48 |
super ();
|
|
49 |
_set_delegate (delegate);
|
|
50 |
}
|
|
51 |
|
|
52 |
|
|
53 |
// Operation to obtain the IR from the sending context
|
|
54 |
public com.sun.org.omg.CORBA.Repository get_ir ()
|
|
55 |
{
|
|
56 |
org.omg.CORBA.portable.InputStream _in = null;
|
|
57 |
try {
|
|
58 |
org.omg.CORBA.portable.OutputStream _out = _request ("get_ir", true);
|
|
59 |
_in = _invoke (_out);
|
|
60 |
com.sun.org.omg.CORBA.Repository __result = com.sun.org.omg.CORBA.RepositoryHelper.read (_in);
|
|
61 |
return __result;
|
|
62 |
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
|
|
63 |
_in = _ex.getInputStream ();
|
|
64 |
String _id = _ex.getId ();
|
|
65 |
throw new org.omg.CORBA.MARSHAL (_id);
|
|
66 |
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
|
|
67 |
return get_ir ();
|
|
68 |
} finally {
|
|
69 |
_releaseReply (_in);
|
|
70 |
}
|
|
71 |
} // get_ir
|
|
72 |
|
|
73 |
|
|
74 |
// Operations to obtain a URL to the implementation code
|
|
75 |
public String implementation (String x)
|
|
76 |
{
|
|
77 |
org.omg.CORBA.portable.InputStream _in = null;
|
|
78 |
try {
|
|
79 |
org.omg.CORBA.portable.OutputStream _out = _request ("implementation", true);
|
|
80 |
com.sun.org.omg.CORBA.RepositoryIdHelper.write (_out, x);
|
|
81 |
_in = _invoke (_out);
|
|
82 |
String __result = com.sun.org.omg.SendingContext.CodeBasePackage.URLHelper.read (_in);
|
|
83 |
return __result;
|
|
84 |
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
|
|
85 |
_in = _ex.getInputStream ();
|
|
86 |
String _id = _ex.getId ();
|
|
87 |
throw new org.omg.CORBA.MARSHAL (_id);
|
|
88 |
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
|
|
89 |
return implementation (x);
|
|
90 |
} finally {
|
|
91 |
_releaseReply (_in);
|
|
92 |
}
|
|
93 |
} // implementation
|
|
94 |
|
|
95 |
public String[] implementations (String[] x)
|
|
96 |
{
|
|
97 |
org.omg.CORBA.portable.InputStream _in = null;
|
|
98 |
try {
|
|
99 |
org.omg.CORBA.portable.OutputStream _out = _request ("implementations", true);
|
|
100 |
com.sun.org.omg.CORBA.RepositoryIdSeqHelper.write (_out, x);
|
|
101 |
_in = _invoke (_out);
|
|
102 |
String __result[] = com.sun.org.omg.SendingContext.CodeBasePackage.URLSeqHelper.read (_in);
|
|
103 |
return __result;
|
|
104 |
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
|
|
105 |
_in = _ex.getInputStream ();
|
|
106 |
String _id = _ex.getId ();
|
|
107 |
throw new org.omg.CORBA.MARSHAL (_id);
|
|
108 |
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
|
|
109 |
return implementations (x);
|
|
110 |
} finally {
|
|
111 |
_releaseReply (_in);
|
|
112 |
}
|
|
113 |
} // implementations
|
|
114 |
|
|
115 |
|
|
116 |
// the same information
|
|
117 |
public com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription meta (String x)
|
|
118 |
{
|
|
119 |
org.omg.CORBA.portable.InputStream _in = null;
|
|
120 |
try {
|
|
121 |
org.omg.CORBA.portable.OutputStream _out = _request ("meta", true);
|
|
122 |
com.sun.org.omg.CORBA.RepositoryIdHelper.write (_out, x);
|
|
123 |
_in = _invoke (_out);
|
|
124 |
com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription __result = com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescriptionHelper.read (_in);
|
|
125 |
return __result;
|
|
126 |
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
|
|
127 |
_in = _ex.getInputStream ();
|
|
128 |
String _id = _ex.getId ();
|
|
129 |
throw new org.omg.CORBA.MARSHAL (_id);
|
|
130 |
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
|
|
131 |
return meta (x);
|
|
132 |
} finally {
|
|
133 |
_releaseReply (_in);
|
|
134 |
}
|
|
135 |
} // meta
|
|
136 |
|
|
137 |
public com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription[] metas (String[] x)
|
|
138 |
{
|
|
139 |
org.omg.CORBA.portable.InputStream _in = null;
|
|
140 |
try {
|
|
141 |
org.omg.CORBA.portable.OutputStream _out = _request ("metas", true);
|
|
142 |
com.sun.org.omg.CORBA.RepositoryIdSeqHelper.write (_out, x);
|
|
143 |
_in = _invoke (_out);
|
|
144 |
com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription __result[] = com.sun.org.omg.SendingContext.CodeBasePackage.ValueDescSeqHelper.read (_in);
|
|
145 |
return __result;
|
|
146 |
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
|
|
147 |
_in = _ex.getInputStream ();
|
|
148 |
String _id = _ex.getId ();
|
|
149 |
throw new org.omg.CORBA.MARSHAL (_id);
|
|
150 |
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
|
|
151 |
return metas (x);
|
|
152 |
} finally {
|
|
153 |
_releaseReply (_in);
|
|
154 |
}
|
|
155 |
} // metas
|
|
156 |
|
|
157 |
|
|
158 |
// information
|
|
159 |
public String[] bases (String x)
|
|
160 |
{
|
|
161 |
org.omg.CORBA.portable.InputStream _in = null;
|
|
162 |
try {
|
|
163 |
org.omg.CORBA.portable.OutputStream _out = _request ("bases", true);
|
|
164 |
com.sun.org.omg.CORBA.RepositoryIdHelper.write (_out, x);
|
|
165 |
_in = _invoke (_out);
|
|
166 |
String __result[] = com.sun.org.omg.CORBA.RepositoryIdSeqHelper.read (_in);
|
|
167 |
return __result;
|
|
168 |
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
|
|
169 |
_in = _ex.getInputStream ();
|
|
170 |
String _id = _ex.getId ();
|
|
171 |
throw new org.omg.CORBA.MARSHAL (_id);
|
|
172 |
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
|
|
173 |
return bases (x);
|
|
174 |
} finally {
|
|
175 |
_releaseReply (_in);
|
|
176 |
}
|
|
177 |
} // bases
|
|
178 |
|
|
179 |
// Type-specific CORBA::Object operations
|
|
180 |
private static String[] __ids = {
|
|
181 |
"IDL:omg.org/SendingContext/CodeBase:1.0",
|
|
182 |
"IDL:omg.org/SendingContext/RunTime:1.0"};
|
|
183 |
|
|
184 |
public String[] _ids ()
|
|
185 |
{
|
|
186 |
return (String[])__ids.clone ();
|
|
187 |
}
|
|
188 |
|
|
189 |
private void readObject (java.io.ObjectInputStream s)
|
|
190 |
{
|
|
191 |
try
|
|
192 |
{
|
|
193 |
String str = s.readUTF ();
|
|
194 |
org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str);
|
|
195 |
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
|
|
196 |
_set_delegate (delegate);
|
|
197 |
} catch (java.io.IOException e) {}
|
|
198 |
}
|
|
199 |
|
|
200 |
private void writeObject (java.io.ObjectOutputStream s)
|
|
201 |
{
|
|
202 |
try
|
|
203 |
{
|
|
204 |
String str = org.omg.CORBA.ORB.init ().object_to_string (this);
|
|
205 |
s.writeUTF (str);
|
|
206 |
} catch (java.io.IOException e) {}
|
|
207 |
}
|
|
208 |
} // class _CodeBaseStub
|