KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > iiop > interfaces > IdlInterfacePOA


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.iiop.interfaces;
23
24
25 /**
26 * org/jboss/test/iiop/interfaces/IdlInterfacePOA.java .
27 * Generated by the IDL-to-Java compiler (portable), version "3.1"
28 * from IdlInterface.idl
29 * Tuesday, October 21, 2003 3:27:17 PM BRST
30 */

31
32 public abstract class IdlInterfacePOA extends org.omg.PortableServer.Servant JavaDoc
33  implements org.jboss.test.iiop.interfaces.IdlInterfaceOperations, org.omg.CORBA.portable.InvokeHandler JavaDoc
34 {
35
36   // Constructors
37

38   private static java.util.Hashtable JavaDoc _methods = new java.util.Hashtable JavaDoc ();
39   static
40   {
41     _methods.put ("echo", new java.lang.Integer JavaDoc (0));
42   }
43
44   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
45                                 org.omg.CORBA.portable.InputStream JavaDoc in,
46                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
47   {
48     org.omg.CORBA.portable.OutputStream JavaDoc out = null;
49     java.lang.Integer JavaDoc __method = (java.lang.Integer JavaDoc)_methods.get ($method);
50     if (__method == null)
51       throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
52
53     switch (__method.intValue ())
54     {
55        case 0: // org/jboss/test/iiop/interfaces/IdlInterface/echo
56
{
57          String JavaDoc s = in.read_string ();
58          String JavaDoc $result = null;
59          $result = this.echo (s);
60          out = $rh.createReply();
61          out.write_string ($result);
62          break;
63        }
64
65        default:
66          throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
67     }
68
69     return out;
70   } // _invoke
71

72   // Type-specific CORBA::Object operations
73
private static String JavaDoc[] __ids = {
74     "IDL:org/jboss/test/iiop/interfaces/IdlInterface:1.0"};
75
76   public String JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
77   {
78     return (String JavaDoc[])__ids.clone ();
79   }
80
81   public IdlInterface _this()
82   {
83     return IdlInterfaceHelper.narrow(
84     super._this_object());
85   }
86
87   public IdlInterface _this(org.omg.CORBA.ORB JavaDoc orb)
88   {
89     return IdlInterfaceHelper.narrow(
90     super._this_object(orb));
91   }
92
93
94 } // class IdlInterfacePOA
95
Popular Tags