1 /*
   2  * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package com.sun.org.omg.SendingContext;
  26 
  27 
  28 /**
  29 * com/sun/org/omg/SendingContext/_CodeBaseImplBase.java
  30 * Generated by the IDL-to-Java compiler (portable), version "3.0"
  31 * from rt.idl
  32 * Thursday, May 6, 1999 1:52:08 AM PDT
  33 */
  34 
  35 public abstract class _CodeBaseImplBase extends org.omg.CORBA.portable.ObjectImpl
  36     implements com.sun.org.omg.SendingContext.CodeBase, org.omg.CORBA.portable.InvokeHandler
  37 {
  38 
  39     // Constructors
  40     public _CodeBaseImplBase ()
  41     {
  42     }
  43 
  44     private static java.util.Hashtable _methods = new java.util.Hashtable ();
  45     static
  46     {
  47         _methods.put ("get_ir", new java.lang.Integer (0));
  48         _methods.put ("implementation", new java.lang.Integer (1));
  49         _methods.put ("implementations", new java.lang.Integer (2));
  50         _methods.put ("meta", new java.lang.Integer (3));
  51         _methods.put ("metas", new java.lang.Integer (4));
  52         _methods.put ("bases", new java.lang.Integer (5));
  53     }
  54 
  55     public org.omg.CORBA.portable.OutputStream _invoke (String method,
  56                                                         org.omg.CORBA.portable.InputStream in,
  57                                                         org.omg.CORBA.portable.ResponseHandler rh)
  58     {
  59         org.omg.CORBA.portable.OutputStream out = rh.createReply();
  60         java.lang.Integer __method = (java.lang.Integer)_methods.get (method);
  61         if (__method == null)
  62             throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
  63 
  64         switch (__method.intValue ())
  65             {
  66 
  67                 // Operation to obtain the IR from the sending context
  68             case 0:  // SendingContext/CodeBase/get_ir
  69                 {
  70                     com.sun.org.omg.CORBA.Repository __result = null;
  71                     __result = this.get_ir ();
  72                     com.sun.org.omg.CORBA.RepositoryHelper.write (out, __result);
  73                     break;
  74                 }
  75 
  76 
  77                 // Operations to obtain a URL to the implementation code
  78             case 1:  // SendingContext/CodeBase/implementation
  79                 {
  80                     String x = com.sun.org.omg.CORBA.RepositoryIdHelper.read (in);
  81                     String __result = null;
  82                     __result = this.implementation (x);
  83                     out.write_string (__result);
  84                     break;
  85                 }
  86 
  87             case 2:  // SendingContext/CodeBase/implementations
  88                 {
  89                     String x[] = com.sun.org.omg.CORBA.RepositoryIdSeqHelper.read (in);
  90                     String __result[] = null;
  91                     __result = this.implementations (x);
  92                     com.sun.org.omg.SendingContext.CodeBasePackage.URLSeqHelper.write (out, __result);
  93                     break;
  94                 }
  95 
  96 
  97                 // the same information
  98             case 3:  // SendingContext/CodeBase/meta
  99                 {
 100                     String x = com.sun.org.omg.CORBA.RepositoryIdHelper.read (in);
 101                     com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription __result = null;
 102                     __result = this.meta (x);
 103                     com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescriptionHelper.write (out, __result);
 104                     break;
 105                 }
 106 
 107             case 4:  // SendingContext/CodeBase/metas
 108                 {
 109                     String x[] = com.sun.org.omg.CORBA.RepositoryIdSeqHelper.read (in);
 110                     com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription __result[] = null;
 111                     __result = this.metas (x);
 112                     com.sun.org.omg.SendingContext.CodeBasePackage.ValueDescSeqHelper.write (out, __result);
 113                     break;
 114                 }
 115 
 116 
 117                 // information
 118             case 5:  // SendingContext/CodeBase/bases
 119                 {
 120                     String x = com.sun.org.omg.CORBA.RepositoryIdHelper.read (in);
 121                     String __result[] = null;
 122                     __result = this.bases (x);
 123                     com.sun.org.omg.CORBA.RepositoryIdSeqHelper.write (out, __result);
 124                     break;
 125                 }
 126 
 127             default:
 128                 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
 129             }
 130 
 131         return out;
 132     } // _invoke
 133 
 134     // Type-specific CORBA::Object operations
 135     private static String[] __ids = {
 136         "IDL:omg.org/SendingContext/CodeBase:1.0",
 137         "IDL:omg.org/SendingContext/RunTime:1.0"};
 138 
 139     public String[] _ids ()
 140     {
 141         return (String[]) __ids.clone();
 142     }
 143 
 144 
 145 } // class _CodeBaseImplBase