01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * 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: * org/jboss/test/iiop/interfaces/IdlInterfacePOA.java .
26: * Generated by the IDL-to-Java compiler (portable), version "3.1"
27: * from IdlInterface.idl
28: * Tuesday, October 21, 2003 3:27:17 PM BRST
29: */
30:
31: public abstract class IdlInterfacePOA extends
32: org.omg.PortableServer.Servant implements
33: org.jboss.test.iiop.interfaces.IdlInterfaceOperations,
34: org.omg.CORBA.portable.InvokeHandler {
35:
36: // Constructors
37:
38: private static java.util.Hashtable _methods = new java.util.Hashtable();
39: static {
40: _methods.put("echo", new java.lang.Integer(0));
41: }
42:
43: public org.omg.CORBA.portable.OutputStream _invoke(String $method,
44: org.omg.CORBA.portable.InputStream in,
45: org.omg.CORBA.portable.ResponseHandler $rh) {
46: org.omg.CORBA.portable.OutputStream out = null;
47: java.lang.Integer __method = (java.lang.Integer) _methods
48: .get($method);
49: if (__method == null)
50: throw new org.omg.CORBA.BAD_OPERATION(0,
51: org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
52:
53: switch (__method.intValue()) {
54: case 0: // org/jboss/test/iiop/interfaces/IdlInterface/echo
55: {
56: String s = in.read_string();
57: String $result = null;
58: $result = this .echo(s);
59: out = $rh.createReply();
60: out.write_string($result);
61: break;
62: }
63:
64: default:
65: throw new org.omg.CORBA.BAD_OPERATION(0,
66: org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
67: }
68:
69: return out;
70: } // _invoke
71:
72: // Type-specific CORBA::Object operations
73: private static String[] __ids = { "IDL:org/jboss/test/iiop/interfaces/IdlInterface:1.0" };
74:
75: public String[] _all_interfaces(org.omg.PortableServer.POA poa,
76: byte[] objectId) {
77: return (String[]) __ids.clone();
78: }
79:
80: public IdlInterface _this () {
81: return IdlInterfaceHelper.narrow(super ._this _object());
82: }
83:
84: public IdlInterface _this (org.omg.CORBA.ORB orb) {
85: return IdlInterfaceHelper.narrow(super ._this _object(orb));
86: }
87:
88: } // class IdlInterfacePOA
|