KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.sun.corba.se.spi.activation;
2
3
4 /**
5 * com/sun/corba/se/spi/activation/_ServerStub.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
12 /** Server callback API, passed to Activator in active method.
13     */

14 public class _ServerStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements com.sun.corba.se.spi.activation.Server
15 {
16
17
18   /** Shutdown this server. Returns after orb.shutdown() completes.
19     */

20   public void shutdown ()
21   {
22             org.omg.CORBA.portable.InputStream JavaDoc $in = null;
23             try {
24                 org.omg.CORBA.portable.OutputStream JavaDoc $out = _request ("shutdown", true);
25                 $in = _invoke ($out);
26                 return;
27             } catch (org.omg.CORBA.portable.ApplicationException JavaDoc $ex) {
28                 $in = $ex.getInputStream ();
29                 String JavaDoc _id = $ex.getId ();
30                 throw new org.omg.CORBA.MARSHAL JavaDoc (_id);
31             } catch (org.omg.CORBA.portable.RemarshalException JavaDoc $rm) {
32                 shutdown ( );
33             } finally {
34                 _releaseReply ($in);
35             }
36   } // shutdown
37

38
39   /** Install the server. Returns after the install hook completes
40     * execution in the server.
41     */

42   public void install ()
43   {
44             org.omg.CORBA.portable.InputStream JavaDoc $in = null;
45             try {
46                 org.omg.CORBA.portable.OutputStream JavaDoc $out = _request ("install", true);
47                 $in = _invoke ($out);
48                 return;
49             } catch (org.omg.CORBA.portable.ApplicationException JavaDoc $ex) {
50                 $in = $ex.getInputStream ();
51                 String JavaDoc _id = $ex.getId ();
52                 throw new org.omg.CORBA.MARSHAL JavaDoc (_id);
53             } catch (org.omg.CORBA.portable.RemarshalException JavaDoc $rm) {
54                 install ( );
55             } finally {
56                 _releaseReply ($in);
57             }
58   } // install
59

60
61   /** Uninstall the server. Returns after the uninstall hook
62     * completes execution.
63     */

64   public void uninstall ()
65   {
66             org.omg.CORBA.portable.InputStream JavaDoc $in = null;
67             try {
68                 org.omg.CORBA.portable.OutputStream JavaDoc $out = _request ("uninstall", true);
69                 $in = _invoke ($out);
70                 return;
71             } catch (org.omg.CORBA.portable.ApplicationException JavaDoc $ex) {
72                 $in = $ex.getInputStream ();
73                 String JavaDoc _id = $ex.getId ();
74                 throw new org.omg.CORBA.MARSHAL JavaDoc (_id);
75             } catch (org.omg.CORBA.portable.RemarshalException JavaDoc $rm) {
76                 uninstall ( );
77             } finally {
78                 _releaseReply ($in);
79             }
80   } // uninstall
81

82   // Type-specific CORBA::Object operations
83
private static String JavaDoc[] __ids = {
84     "IDL:activation/Server:1.0"};
85
86   public String JavaDoc[] _ids ()
87   {
88     return (String JavaDoc[])__ids.clone ();
89   }
90
91   private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
92   {
93      String JavaDoc str = s.readUTF ();
94      String JavaDoc[] args = null;
95      java.util.Properties JavaDoc props = null;
96      org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
97      org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
98      _set_delegate (delegate);
99   }
100
101   private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
102   {
103      String JavaDoc[] args = null;
104      java.util.Properties JavaDoc props = null;
105      String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
106      s.writeUTF (str);
107   }
108 } // class _ServerStub
109
Popular Tags