49 |
import org.omg.CORBA.Policy; |
import org.omg.CORBA.Policy; |
50 |
import org.omg.CORBA.Request; |
import org.omg.CORBA.Request; |
51 |
import org.omg.CORBA.SetOverrideType; |
import org.omg.CORBA.SetOverrideType; |
52 |
|
import org.omg.CORBA.portable.ApplicationException; |
53 |
|
import org.omg.CORBA.portable.InputStream; |
54 |
|
import org.omg.CORBA.portable.OutputStream; |
55 |
|
import org.omg.CORBA.portable.RemarshalException; |
56 |
|
import org.omg.CORBA.portable.ServantObject; |
57 |
|
|
58 |
|
import javax.rmi.CORBA.Util; |
59 |
|
|
60 |
/** |
/** |
61 |
* An object, formally implementing the CORBA {@link Object}, but actually |
* An object, formally implementing the CORBA {@link Object}, but actually |
148 |
* |
* |
149 |
* @throws NO_IMPLEMENT, always. |
* @throws NO_IMPLEMENT, always. |
150 |
*/ |
*/ |
151 |
|
public org.omg.CORBA.Object _get_interface() |
152 |
|
{ |
153 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
154 |
|
} |
155 |
|
|
156 |
|
/** |
157 |
|
* This method is not appropriate for the local objects and just |
158 |
|
* throws an exception. |
159 |
|
* |
160 |
|
* @throws NO_IMPLEMENT, always. |
161 |
|
*/ |
162 |
public Policy _get_policy(int a_policy_type) |
public Policy _get_policy(int a_policy_type) |
163 |
throws BAD_PARAM |
throws BAD_PARAM |
164 |
{ |
{ |
250 |
{ |
{ |
251 |
throw new NO_IMPLEMENT(INAPPROPRIATE); |
throw new NO_IMPLEMENT(INAPPROPRIATE); |
252 |
} |
} |
253 |
|
|
254 |
|
/** |
255 |
|
* This method is called from <code>rmic</code> generated stubs if the |
256 |
|
* {@link Util#isLocal()}, called passing <code>this</code> as parameter, |
257 |
|
* returns true. If the method returns null, the requested method is then |
258 |
|
* invoked on <code>this</code>. Else it is invoked on the returned object, |
259 |
|
* casting it into the interface that the local object implements. In this |
260 |
|
* case, the generated stub also later calls |
261 |
|
* {@link _servant_postinvoke(ServantObject)}, passing that returned target |
262 |
|
* as parameter. |
263 |
|
* |
264 |
|
* @param operation the name of the method being invoked. |
265 |
|
* @param expectedType the interface that the returned servant |
266 |
|
* object must implement. |
267 |
|
* |
268 |
|
* @throws NO_IMPLEMENT always. If used, the method must be overridden. |
269 |
|
*/ |
270 |
|
public ServantObject _servant_preinvoke(String operation, Class expectedType) |
271 |
|
{ |
272 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
273 |
|
} |
274 |
|
|
275 |
|
|
276 |
|
/** |
277 |
|
* This method is called from <code>rmic</code> generated stubs if the |
278 |
|
* {@link Util#isLocal()}, called passing <code>this</code> as parameter, |
279 |
|
* returns true, and the {@link #_servant_preinvoke} return non-null object. |
280 |
|
* The stub then invokes the requrested method on that returned object and |
281 |
|
* later calls _servant_postinvoke, passing that returned target as parameter. |
282 |
|
* |
283 |
|
* @param servant the object that has served as the invocation target for the |
284 |
|
* current operation. |
285 |
|
*/ |
286 |
|
public void _servant_postinvoke(ServantObject servant) |
287 |
|
{ |
288 |
|
} |
289 |
|
|
290 |
|
/** |
291 |
|
* Invokes the operation. This method takes the OutputStream that was previously |
292 |
|
* returned by a {@link _request()} and returns an InputStream which |
293 |
|
* contains the reply. Up till jdk 1.5 inclusive this method is marked as |
294 |
|
* unimplemented. |
295 |
|
* |
296 |
|
* @throws NO_IMPLEMENT always. |
297 |
|
*/ |
298 |
|
public InputStream _invoke(OutputStream output) |
299 |
|
throws ApplicationException, RemarshalException |
300 |
|
{ |
301 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
302 |
|
} |
303 |
|
|
304 |
|
/** |
305 |
|
* While it may look that this should return true, the jdk 1.5 API states |
306 |
|
* that it must throw NO_IMPLEMENT instead. The rmi stubs do not call this |
307 |
|
* method to check if the object is local; they call {@link Util#isLocal()} |
308 |
|
* instead (passing <code>this</code> as parameter). |
309 |
|
* |
310 |
|
* @return never. |
311 |
|
* |
312 |
|
* @throws NO_IMPLEMENT always. |
313 |
|
*/ |
314 |
|
public boolean _is_local() |
315 |
|
{ |
316 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
317 |
|
} |
318 |
|
|
319 |
|
|
320 |
|
/** |
321 |
|
* This method is not appropriate for the local objects and just |
322 |
|
* throws an exception. |
323 |
|
* |
324 |
|
* @throws NO_IMPLEMENT, always. |
325 |
|
*/ |
326 |
|
public ORB _orb() |
327 |
|
{ |
328 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
329 |
|
} |
330 |
|
|
331 |
|
/** |
332 |
|
* This method is not appropriate for the local objects and just |
333 |
|
* throws an exception. |
334 |
|
* |
335 |
|
* @throws NO_IMPLEMENT, always. |
336 |
|
*/ |
337 |
|
public void _releaseReply(InputStream input) |
338 |
|
{ |
339 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
340 |
|
} |
341 |
|
|
342 |
|
/** |
343 |
|
* This method is not appropriate for the local objects and just |
344 |
|
* throws an exception. |
345 |
|
* |
346 |
|
* @throws NO_IMPLEMENT, always. |
347 |
|
*/ |
348 |
|
public OutputStream _request(String operation, boolean responseExpected) |
349 |
|
{ |
350 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
351 |
|
} |
352 |
|
|
353 |
|
/** |
354 |
|
* This method is not appropriate for the local objects and just |
355 |
|
* throws an exception. |
356 |
|
* |
357 |
|
* @throws NO_IMPLEMENT, always. |
358 |
|
*/ |
359 |
|
public boolean validate_connection() |
360 |
|
{ |
361 |
|
throw new NO_IMPLEMENT(INAPPROPRIATE); |
362 |
|
} |
363 |
} |
} |