KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.sun.corba.se.PortableActivationIDL;
2
3
4 /**
5 * com/sun/corba/se/PortableActivationIDL/ServerProxyHelper.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 /** Server callback interface, passed to Activator in registerServer method.
13     */

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