KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > activation > _InitialNameServiceStub


1 package com.sun.corba.se.spi.activation;
2
3
4 /**
5 * com/sun/corba/se/spi/activation/_InitialNameServiceStub.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/com/sun/corba/se/spi/activation/activation.idl
8 * Saturday, February 9, 2008 2:04:39 AM PST
9 */

10
11 public class _InitialNameServiceStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements com.sun.corba.se.spi.activation.InitialNameService
12 {
13
14
15   // bind initial name
16
public void bind (String JavaDoc name, org.omg.CORBA.Object JavaDoc obj, boolean isPersistant) throws com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBound
17   {
18             org.omg.CORBA.portable.InputStream JavaDoc $in = null;
19             try {
20                 org.omg.CORBA.portable.OutputStream JavaDoc $out = _request ("bind", true);
21                 $out.write_string (name);
22                 org.omg.CORBA.ObjectHelper.write ($out, obj);
23                 $out.write_boolean (isPersistant);
24                 $in = _invoke ($out);
25                 return;
26             } catch (org.omg.CORBA.portable.ApplicationException JavaDoc $ex) {
27                 $in = $ex.getInputStream ();
28                 String JavaDoc _id = $ex.getId ();
29                 if (_id.equals ("IDL:activation/InitialNameService/NameAlreadyBound:1.0"))
30                     throw com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBoundHelper.read ($in);
31                 else
32                     throw new org.omg.CORBA.MARSHAL JavaDoc (_id);
33             } catch (org.omg.CORBA.portable.RemarshalException JavaDoc $rm) {
34                 bind (name, obj, isPersistant );
35             } finally {
36                 _releaseReply ($in);
37             }
38   } // bind
39

40   // Type-specific CORBA::Object operations
41
private static String JavaDoc[] __ids = {
42     "IDL:activation/InitialNameService:1.0"};
43
44   public String JavaDoc[] _ids ()
45   {
46     return (String JavaDoc[])__ids.clone ();
47   }
48
49   private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
50   {
51      String JavaDoc str = s.readUTF ();
52      String JavaDoc[] args = null;
53      java.util.Properties JavaDoc props = null;
54      org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
55      org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
56      _set_delegate (delegate);
57   }
58
59   private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
60   {
61      String JavaDoc[] args = null;
62      java.util.Properties JavaDoc props = null;
63      String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
64      s.writeUTF (str);
65   }
66 } // class _InitialNameServiceStub
67
Popular Tags