001    package tecgraf.openbus.opendreams;
002    
003    
004    /**
005     * Generated from IDL interface "IOpenDreams".
006     *
007     * @author JacORB IDL compiler V 2.3-beta-2, 14-Oct-2006
008     * @version generated at Nov 3, 2010 2:32:41 PM
009     */
010    
011    public abstract class IOpenDreamsPOA
012            extends org.omg.PortableServer.Servant
013            implements org.omg.CORBA.portable.InvokeHandler, tecgraf.openbus.opendreams.IOpenDreamsOperations
014    {
015            static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
016            static
017            {
018                    m_opsHash.put ( "getSession", new java.lang.Integer(0));
019            }
020            private String[] ids = {"IDL:tecgraf/openbus/opendreams/IOpenDreams:1.0"};
021            public tecgraf.openbus.opendreams.IOpenDreams _this()
022            {
023                    return tecgraf.openbus.opendreams.IOpenDreamsHelper.narrow(_this_object());
024            }
025            public tecgraf.openbus.opendreams.IOpenDreams _this(org.omg.CORBA.ORB orb)
026            {
027                    return tecgraf.openbus.opendreams.IOpenDreamsHelper.narrow(_this_object(orb));
028            }
029            public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
030                    throws org.omg.CORBA.SystemException
031            {
032                    org.omg.CORBA.portable.OutputStream _out = null;
033                    // do something
034                    // quick lookup of operation
035                    java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
036                    if ( null == opsIndex )
037                            throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
038                    switch ( opsIndex.intValue() )
039                    {
040                            case 0: // getSession
041                            {
042                            try
043                            {
044                                    java.lang.String _arg0=_input.read_string();
045                                    _out = handler.createReply();
046                                    tecgraf.openbus.DRMAA.SessionHelper.write(_out,getSession(_arg0));
047                            }
048                            catch(tecgraf.openbus.DRMAA.AuthorizationException _ex0)
049                            {
050                                    _out = handler.createExceptionReply();
051                                    tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.write(_out, _ex0);
052                            }
053                            catch(tecgraf.openbus.DRMAA.InternalException _ex1)
054                            {
055                                    _out = handler.createExceptionReply();
056                                    tecgraf.openbus.DRMAA.InternalExceptionHelper.write(_out, _ex1);
057                            }
058                                    break;
059                            }
060                    }
061                    return _out;
062            }
063    
064            public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
065            {
066                    return ids;
067            }
068    }