KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.sun.corba.se.PortableActivationIDL;
2
3
4 /**
5 * com/sun/corba/se/PortableActivationIDL/ServerManagerHelper.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 combine the Activator and Locator when both are
13     * implemented together in the same process, as is currently the case
14     * for our implementation.
15     */

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