KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > PortableActivationIDL > _InitialNameServiceStub


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

10
11
12 /** Interface used to support binding references in the bootstrap name
13     * service.
14     */

15 public class _InitialNameServiceStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements com.sun.corba.se.PortableActivationIDL.InitialNameService
16 {
17
18
19   /** bind initial name
20     */

21   public void bind (String JavaDoc name, org.omg.CORBA.Object JavaDoc obj, boolean isPersistant) throws com.sun.corba.se.PortableActivationIDL.InitialNameServicePackage.NameAlreadyBound
22   {
23             org.omg.CORBA.portable.InputStream JavaDoc $in = null;
24             try {
25                 org.omg.CORBA.portable.OutputStream JavaDoc $out = _request ("bind", true);
26                 $out.write_string (name);
27                 org.omg.CORBA.ObjectHelper.write ($out, obj);
28                 $out.write_boolean (isPersistant);
29                 $in = _invoke ($out);
30                 return;
31             } catch (org.omg.CORBA.portable.ApplicationException JavaDoc $ex) {
32                 $in = $ex.getInputStream ();
33                 String JavaDoc _id = $ex.getId ();
34                 if (_id.equals ("IDL:PortableActivationIDL/InitialNameService/NameAlreadyBound:1.0"))
35                     throw com.sun.corba.se.PortableActivationIDL.InitialNameServicePackage.NameAlreadyBoundHelper.read ($in);
36                 else
37                     throw new org.omg.CORBA.MARSHAL JavaDoc (_id);
38             } catch (org.omg.CORBA.portable.RemarshalException JavaDoc $rm) {
39                 bind (name, obj, isPersistant );
40             } finally {
41                 _releaseReply ($in);
42             }
43   } // bind
44

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