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 class _IOpenDreamsStub
012 extends org.omg.CORBA.portable.ObjectImpl
013 implements tecgraf.openbus.opendreams.IOpenDreams
014 {
015 private String[] ids = {"IDL:tecgraf/openbus/opendreams/IOpenDreams:1.0"};
016 public String[] _ids()
017 {
018 return ids;
019 }
020
021 public final static java.lang.Class _opsClass = tecgraf.openbus.opendreams.IOpenDreamsOperations.class;
022 public tecgraf.openbus.DRMAA.Session getSession(java.lang.String projectId) throws tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.InternalException
023 {
024 while(true)
025 {
026 if(! this._is_local())
027 {
028 org.omg.CORBA.portable.InputStream _is = null;
029 try
030 {
031 org.omg.CORBA.portable.OutputStream _os = _request( "getSession", true);
032 _os.write_string(projectId);
033 _is = _invoke(_os);
034 tecgraf.openbus.DRMAA.Session _result = tecgraf.openbus.DRMAA.SessionHelper.read(_is);
035 return _result;
036 }
037 catch( org.omg.CORBA.portable.RemarshalException _rx ){}
038 catch( org.omg.CORBA.portable.ApplicationException _ax )
039 {
040 String _id = _ax.getId();
041 if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
042 {
043 throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
044 }
045 else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
046 {
047 throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
048 }
049 throw new RuntimeException("Unexpected exception " + _id );
050 }
051 finally
052 {
053 this._releaseReply(_is);
054 }
055 }
056 else
057 {
058 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "getSession", _opsClass );
059 if( _so == null )
060 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
061 IOpenDreamsOperations _localServant = (IOpenDreamsOperations)_so.servant;
062 tecgraf.openbus.DRMAA.Session _result;
063 try
064 {
065 _result = _localServant.getSession(projectId);
066 }
067 finally
068 {
069 _servant_postinvoke(_so);
070 }
071 return _result;
072 }
073
074 }
075
076 }
077
078 }