KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.sun.corba.se.PortableActivationIDL;
2
3
4 /**
5 * com/sun/corba/se/PortableActivationIDL/InitialNameServiceHelper.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 abstract public class InitialNameServiceHelper
16 {
17   private static String JavaDoc _id = "IDL:PortableActivationIDL/InitialNameService:1.0";
18
19   public static void insert (org.omg.CORBA.Any JavaDoc a, com.sun.corba.se.PortableActivationIDL.InitialNameService that)
20   {
21     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
22     a.type (type ());
23     write (out, that);
24     a.read_value (out.create_input_stream (), type ());
25   }
26
27   public static com.sun.corba.se.PortableActivationIDL.InitialNameService extract (org.omg.CORBA.Any JavaDoc a)
28   {
29     return read (a.create_input_stream ());
30   }
31
32   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
33   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
34   {
35     if (__typeCode == null)
36     {
37       __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (com.sun.corba.se.PortableActivationIDL.InitialNameServiceHelper.id (), "InitialNameService");
38     }
39     return __typeCode;
40   }
41
42   public static String JavaDoc id ()
43   {
44     return _id;
45   }
46
47   public static com.sun.corba.se.PortableActivationIDL.InitialNameService read (org.omg.CORBA.portable.InputStream JavaDoc istream)
48   {
49     return narrow (istream.read_Object (_InitialNameServiceStub.class));
50   }
51
52   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, com.sun.corba.se.PortableActivationIDL.InitialNameService value)
53   {
54     ostream.write_Object ((org.omg.CORBA.Object JavaDoc) value);
55   }
56
57   public static com.sun.corba.se.PortableActivationIDL.InitialNameService narrow (org.omg.CORBA.Object JavaDoc obj)
58   {
59     if (obj == null)
60       return null;
61     else if (obj instanceof com.sun.corba.se.PortableActivationIDL.InitialNameService)
62       return (com.sun.corba.se.PortableActivationIDL.InitialNameService)obj;
63     else if (!obj._is_a (id ()))
64       throw new org.omg.CORBA.BAD_PARAM JavaDoc ();
65     else
66     {
67       org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc)obj)._get_delegate ();
68       com.sun.corba.se.PortableActivationIDL._InitialNameServiceStub stub = new com.sun.corba.se.PortableActivationIDL._InitialNameServiceStub ();
69       stub._set_delegate(delegate);
70       return stub;
71     }
72   }
73
74   public static com.sun.corba.se.PortableActivationIDL.InitialNameService unchecked_narrow (org.omg.CORBA.Object JavaDoc obj)
75   {
76     if (obj == null)
77       return null;
78     else if (obj instanceof com.sun.corba.se.PortableActivationIDL.InitialNameService)
79       return (com.sun.corba.se.PortableActivationIDL.InitialNameService)obj;
80     else
81     {
82       org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc)obj)._get_delegate ();
83       com.sun.corba.se.PortableActivationIDL._InitialNameServiceStub stub = new com.sun.corba.se.PortableActivationIDL._InitialNameServiceStub ();
84       stub._set_delegate(delegate);
85       return stub;
86     }
87   }
88
89 }
90
Popular Tags