KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.sun.corba.se.spi.activation;
2
3
4 /**
5 * com/sun/corba/se/spi/activation/_ServerImplBase.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 abstract class _ServerImplBase extends org.omg.CORBA.portable.ObjectImpl JavaDoc
15                 implements com.sun.corba.se.spi.activation.Server, org.omg.CORBA.portable.InvokeHandler JavaDoc
16 {
17
18   // Constructors
19
public _ServerImplBase ()
20   {
21   }
22
23   private static java.util.Hashtable JavaDoc _methods = new java.util.Hashtable JavaDoc ();
24   static
25   {
26     _methods.put ("shutdown", new java.lang.Integer JavaDoc (0));
27     _methods.put ("install", new java.lang.Integer JavaDoc (1));
28     _methods.put ("uninstall", new java.lang.Integer JavaDoc (2));
29   }
30
31   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
32                                 org.omg.CORBA.portable.InputStream JavaDoc in,
33                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
34   {
35     org.omg.CORBA.portable.OutputStream JavaDoc out = null;
36     java.lang.Integer JavaDoc __method = (java.lang.Integer JavaDoc)_methods.get ($method);
37     if (__method == null)
38       throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
39
40     switch (__method.intValue ())
41     {
42
43   /** Shutdown this server. Returns after orb.shutdown() completes.
44     */

45        case 0: // activation/Server/shutdown
46
{
47          this.shutdown ();
48          out = $rh.createReply();
49          break;
50        }
51
52
53   /** Install the server. Returns after the install hook completes
54     * execution in the server.
55     */

56        case 1: // activation/Server/install
57
{
58          this.install ();
59          out = $rh.createReply();
60          break;
61        }
62
63
64   /** Uninstall the server. Returns after the uninstall hook
65     * completes execution.
66     */

67        case 2: // activation/Server/uninstall
68
{
69          this.uninstall ();
70          out = $rh.createReply();
71          break;
72        }
73
74        default:
75          throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
76     }
77
78     return out;
79   } // _invoke
80

81   // Type-specific CORBA::Object operations
82
private static String JavaDoc[] __ids = {
83     "IDL:activation/Server:1.0"};
84
85   public String JavaDoc[] _ids ()
86   {
87     return (String JavaDoc[])__ids.clone ();
88   }
89
90
91 } // class _ServerImplBase
92
Popular Tags