001    package tecgraf.openbus.DRMAA;
002    
003    
004    /**
005     * Generated from IDL interface "Session".
006     *
007     * @author JacORB IDL compiler V 2.3-beta-2, 14-Oct-2006
008     * @version generated at Nov 3, 2010 2:32:40 PM
009     */
010    
011    public class _SessionStub
012            extends org.omg.CORBA.portable.ObjectImpl
013            implements tecgraf.openbus.DRMAA.Session
014    {
015            private String[] ids = {"IDL:tecgraf/openbus/DRMAA/Session:1.0"};
016            public String[] _ids()
017            {
018                    return ids;
019            }
020    
021            public final static java.lang.Class _opsClass = tecgraf.openbus.DRMAA.SessionOperations.class;
022            public java.lang.String[] runBulkJobs(tecgraf.openbus.DRMAA.JobTemplate jobTemplate_, int beginIndex, int endIndex, int step) throws tecgraf.openbus.DRMAA.TryLaterException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.InternalException,tecgraf.openbus.DRMAA.DeniedByDrmException,tecgraf.openbus.DRMAA.InvalidJobTemplateException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.InvalidArgumentException
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( "runBulkJobs", true);
032                                    ((org.omg.CORBA_2_3.portable.OutputStream)_os).write_value (jobTemplate_);
033                                    _os.write_long(beginIndex);
034                                    _os.write_long(endIndex);
035                                    _os.write_long(step);
036                                    _is = _invoke(_os);
037                                    java.lang.String[] _result = tecgraf.openbus.DRMAA.StringListHelper.read(_is);
038                                    return _result;
039                            }
040                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
041                            catch( org.omg.CORBA.portable.ApplicationException _ax )
042                            {
043                                    String _id = _ax.getId();
044                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/TryLaterException:1.0"))
045                                    {
046                                            throw tecgraf.openbus.DRMAA.TryLaterExceptionHelper.read(_ax.getInputStream());
047                                    }
048                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
049                                    {
050                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
051                                    }
052                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
053                                    {
054                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
055                                    }
056                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
057                                    {
058                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
059                                    }
060                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
061                                    {
062                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
063                                    }
064                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DeniedByDrmException:1.0"))
065                                    {
066                                            throw tecgraf.openbus.DRMAA.DeniedByDrmExceptionHelper.read(_ax.getInputStream());
067                                    }
068                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidJobTemplateException:1.0"))
069                                    {
070                                            throw tecgraf.openbus.DRMAA.InvalidJobTemplateExceptionHelper.read(_ax.getInputStream());
071                                    }
072                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
073                                    {
074                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
075                                    }
076                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
077                                    {
078                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
079                                    }
080                                    throw new RuntimeException("Unexpected exception " + _id );
081                            }
082                            finally
083                            {
084                                    this._releaseReply(_is);
085                            }
086                    }
087                    else
088                    {
089                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "runBulkJobs", _opsClass );
090                            if( _so == null )
091                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
092                            SessionOperations _localServant = (SessionOperations)_so.servant;
093                            java.lang.String[] _result;
094                            try
095                            {
096                                    _result = _localServant.runBulkJobs(jobTemplate_,beginIndex,endIndex,step);
097                            }
098                            finally
099                            {
100                                    _servant_postinvoke(_so);
101                            }
102                            return _result;
103                    }
104    
105                    }
106    
107            }
108    
109            public tecgraf.openbus.DRMAA.Version version()
110            {
111                    while(true)
112                    {
113                    if(! this._is_local())
114                    {
115                            org.omg.CORBA.portable.InputStream _is = null;
116                            try
117                            {
118                                    org.omg.CORBA.portable.OutputStream _os = _request("_get_version",true);
119                                    _is = _invoke(_os);
120                                    return tecgraf.openbus.DRMAA.VersionHelper.read(_is);
121                            }
122                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
123                            catch( org.omg.CORBA.portable.ApplicationException _ax )
124                            {
125                                    String _id = _ax.getId();
126                                    throw new RuntimeException("Unexpected exception " + _id );
127                            }
128                            finally
129                            {
130                                    this._releaseReply(_is);
131                            }
132                    }
133    
134                    else
135                    {
136                    org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "_get_version", _opsClass);
137                    if( _so == null )
138                            throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
139                            SessionOperations _localServant = (SessionOperations)_so.servant;
140                            tecgraf.openbus.DRMAA.Version _result;
141                    try
142                    {
143                            _result = _localServant.version();
144                    }
145                    finally
146                    {
147                            _servant_postinvoke(_so);
148                    }
149                    return _result;
150                    }
151                    }
152    
153            }
154    
155            public java.lang.String runJob(tecgraf.openbus.DRMAA.JobTemplate jobTemplate_) throws tecgraf.openbus.DRMAA.TryLaterException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.InternalException,tecgraf.openbus.DRMAA.DeniedByDrmException,tecgraf.openbus.DRMAA.InvalidJobTemplateException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.InvalidArgumentException
156            {
157                    while(true)
158                    {
159                    if(! this._is_local())
160                    {
161                            org.omg.CORBA.portable.InputStream _is = null;
162                            try
163                            {
164                                    org.omg.CORBA.portable.OutputStream _os = _request( "runJob", true);
165                                    ((org.omg.CORBA_2_3.portable.OutputStream)_os).write_value (jobTemplate_);
166                                    _is = _invoke(_os);
167                                    java.lang.String _result = _is.read_string();
168                                    return _result;
169                            }
170                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
171                            catch( org.omg.CORBA.portable.ApplicationException _ax )
172                            {
173                                    String _id = _ax.getId();
174                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/TryLaterException:1.0"))
175                                    {
176                                            throw tecgraf.openbus.DRMAA.TryLaterExceptionHelper.read(_ax.getInputStream());
177                                    }
178                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
179                                    {
180                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
181                                    }
182                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
183                                    {
184                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
185                                    }
186                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
187                                    {
188                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
189                                    }
190                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
191                                    {
192                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
193                                    }
194                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DeniedByDrmException:1.0"))
195                                    {
196                                            throw tecgraf.openbus.DRMAA.DeniedByDrmExceptionHelper.read(_ax.getInputStream());
197                                    }
198                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidJobTemplateException:1.0"))
199                                    {
200                                            throw tecgraf.openbus.DRMAA.InvalidJobTemplateExceptionHelper.read(_ax.getInputStream());
201                                    }
202                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
203                                    {
204                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
205                                    }
206                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
207                                    {
208                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
209                                    }
210                                    throw new RuntimeException("Unexpected exception " + _id );
211                            }
212                            finally
213                            {
214                                    this._releaseReply(_is);
215                            }
216                    }
217                    else
218                    {
219                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "runJob", _opsClass );
220                            if( _so == null )
221                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
222                            SessionOperations _localServant = (SessionOperations)_so.servant;
223                            java.lang.String _result;
224                            try
225                            {
226                                    _result = _localServant.runJob(jobTemplate_);
227                            }
228                            finally
229                            {
230                                    _servant_postinvoke(_so);
231                            }
232                            return _result;
233                    }
234    
235                    }
236    
237            }
238    
239            public java.lang.String contact()
240            {
241                    while(true)
242                    {
243                    if(! this._is_local())
244                    {
245                            org.omg.CORBA.portable.InputStream _is = null;
246                            try
247                            {
248                                    org.omg.CORBA.portable.OutputStream _os = _request("_get_contact",true);
249                                    _is = _invoke(_os);
250                                    return _is.read_string();
251                            }
252                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
253                            catch( org.omg.CORBA.portable.ApplicationException _ax )
254                            {
255                                    String _id = _ax.getId();
256                                    throw new RuntimeException("Unexpected exception " + _id );
257                            }
258                            finally
259                            {
260                                    this._releaseReply(_is);
261                            }
262                    }
263    
264                    else
265                    {
266                    org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "_get_contact", _opsClass);
267                    if( _so == null )
268                            throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
269                            SessionOperations _localServant = (SessionOperations)_so.servant;
270                            java.lang.String _result;
271                    try
272                    {
273                            _result = _localServant.contact();
274                    }
275                    finally
276                    {
277                            _servant_postinvoke(_so);
278                    }
279                    return _result;
280                    }
281                    }
282    
283            }
284    
285            public tecgraf.openbus.DRMAA.JobState jobStatus(java.lang.String jobName) throws tecgraf.openbus.DRMAA.InvalidJobException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.InvalidArgumentException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.InternalException
286            {
287                    while(true)
288                    {
289                    if(! this._is_local())
290                    {
291                            org.omg.CORBA.portable.InputStream _is = null;
292                            try
293                            {
294                                    org.omg.CORBA.portable.OutputStream _os = _request( "jobStatus", true);
295                                    _os.write_string(jobName);
296                                    _is = _invoke(_os);
297                                    tecgraf.openbus.DRMAA.JobState _result = tecgraf.openbus.DRMAA.JobStateHelper.read(_is);
298                                    return _result;
299                            }
300                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
301                            catch( org.omg.CORBA.portable.ApplicationException _ax )
302                            {
303                                    String _id = _ax.getId();
304                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidJobException:1.0"))
305                                    {
306                                            throw tecgraf.openbus.DRMAA.InvalidJobExceptionHelper.read(_ax.getInputStream());
307                                    }
308                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
309                                    {
310                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
311                                    }
312                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
313                                    {
314                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
315                                    }
316                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
317                                    {
318                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
319                                    }
320                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
321                                    {
322                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
323                                    }
324                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
325                                    {
326                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
327                                    }
328                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
329                                    {
330                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
331                                    }
332                                    throw new RuntimeException("Unexpected exception " + _id );
333                            }
334                            finally
335                            {
336                                    this._releaseReply(_is);
337                            }
338                    }
339                    else
340                    {
341                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "jobStatus", _opsClass );
342                            if( _so == null )
343                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
344                            SessionOperations _localServant = (SessionOperations)_so.servant;
345                            tecgraf.openbus.DRMAA.JobState _result;
346                            try
347                            {
348                                    _result = _localServant.jobStatus(jobName);
349                            }
350                            finally
351                            {
352                                    _servant_postinvoke(_so);
353                            }
354                            return _result;
355                    }
356    
357                    }
358    
359            }
360    
361            public tecgraf.openbus.DRMAA.JobInfo _wait(java.lang.String jobName, long timeout) throws tecgraf.openbus.DRMAA.InvalidJobException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.InvalidArgumentException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.InternalException,tecgraf.openbus.DRMAA.ExitTimeoutException
362            {
363                    while(true)
364                    {
365                    if(! this._is_local())
366                    {
367                            org.omg.CORBA.portable.InputStream _is = null;
368                            try
369                            {
370                                    org.omg.CORBA.portable.OutputStream _os = _request( "wait", true);
371                                    _os.write_string(jobName);
372                                    _os.write_longlong(timeout);
373                                    _is = _invoke(_os);
374                                    tecgraf.openbus.DRMAA.JobInfo _result = (tecgraf.openbus.DRMAA.JobInfo)((org.omg.CORBA_2_3.portable.InputStream)_is).read_value ("IDL:tecgraf/openbus/DRMAA/JobInfo:1.0");
375                                    return _result;
376                            }
377                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
378                            catch( org.omg.CORBA.portable.ApplicationException _ax )
379                            {
380                                    String _id = _ax.getId();
381                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidJobException:1.0"))
382                                    {
383                                            throw tecgraf.openbus.DRMAA.InvalidJobExceptionHelper.read(_ax.getInputStream());
384                                    }
385                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
386                                    {
387                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
388                                    }
389                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
390                                    {
391                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
392                                    }
393                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
394                                    {
395                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
396                                    }
397                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
398                                    {
399                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
400                                    }
401                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
402                                    {
403                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
404                                    }
405                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
406                                    {
407                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
408                                    }
409                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/ExitTimeoutException:1.0"))
410                                    {
411                                            throw tecgraf.openbus.DRMAA.ExitTimeoutExceptionHelper.read(_ax.getInputStream());
412                                    }
413                                    throw new RuntimeException("Unexpected exception " + _id );
414                            }
415                            finally
416                            {
417                                    this._releaseReply(_is);
418                            }
419                    }
420                    else
421                    {
422                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "wait", _opsClass );
423                            if( _so == null )
424                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
425                            SessionOperations _localServant = (SessionOperations)_so.servant;
426                            tecgraf.openbus.DRMAA.JobInfo _result;
427                            try
428                            {
429                                    _result = _localServant._wait(jobName,timeout);
430                            }
431                            finally
432                            {
433                                    _servant_postinvoke(_so);
434                            }
435                            return _result;
436                    }
437    
438                    }
439    
440            }
441    
442            public void exit() throws tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.DrmsExitException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.InternalException
443            {
444                    while(true)
445                    {
446                    if(! this._is_local())
447                    {
448                            org.omg.CORBA.portable.InputStream _is = null;
449                            try
450                            {
451                                    org.omg.CORBA.portable.OutputStream _os = _request( "exit", true);
452                                    _is = _invoke(_os);
453                                    return;
454                            }
455                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
456                            catch( org.omg.CORBA.portable.ApplicationException _ax )
457                            {
458                                    String _id = _ax.getId();
459                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
460                                    {
461                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
462                                    }
463                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
464                                    {
465                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
466                                    }
467                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmsExitException:1.0"))
468                                    {
469                                            throw tecgraf.openbus.DRMAA.DrmsExitExceptionHelper.read(_ax.getInputStream());
470                                    }
471                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
472                                    {
473                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
474                                    }
475                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
476                                    {
477                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
478                                    }
479                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
480                                    {
481                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
482                                    }
483                                    throw new RuntimeException("Unexpected exception " + _id );
484                            }
485                            finally
486                            {
487                                    this._releaseReply(_is);
488                            }
489                    }
490                    else
491                    {
492                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "exit", _opsClass );
493                            if( _so == null )
494                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
495                            SessionOperations _localServant = (SessionOperations)_so.servant;
496                            try
497                            {
498                                    _localServant.exit();
499                            }
500                            finally
501                            {
502                                    _servant_postinvoke(_so);
503                            }
504                            return;
505                    }
506    
507                    }
508    
509            }
510    
511            public java.lang.String drmsInfo()
512            {
513                    while(true)
514                    {
515                    if(! this._is_local())
516                    {
517                            org.omg.CORBA.portable.InputStream _is = null;
518                            try
519                            {
520                                    org.omg.CORBA.portable.OutputStream _os = _request("_get_drmsInfo",true);
521                                    _is = _invoke(_os);
522                                    return _is.read_string();
523                            }
524                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
525                            catch( org.omg.CORBA.portable.ApplicationException _ax )
526                            {
527                                    String _id = _ax.getId();
528                                    throw new RuntimeException("Unexpected exception " + _id );
529                            }
530                            finally
531                            {
532                                    this._releaseReply(_is);
533                            }
534                    }
535    
536                    else
537                    {
538                    org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "_get_drmsInfo", _opsClass);
539                    if( _so == null )
540                            throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
541                            SessionOperations _localServant = (SessionOperations)_so.servant;
542                            java.lang.String _result;
543                    try
544                    {
545                            _result = _localServant.drmsInfo();
546                    }
547                    finally
548                    {
549                            _servant_postinvoke(_so);
550                    }
551                    return _result;
552                    }
553                    }
554    
555            }
556    
557            public void synchronize(java.lang.String[] jobList, long timeout, boolean dispose) throws tecgraf.openbus.DRMAA.InvalidJobException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.InvalidArgumentException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.InternalException,tecgraf.openbus.DRMAA.ExitTimeoutException
558            {
559                    while(true)
560                    {
561                    if(! this._is_local())
562                    {
563                            org.omg.CORBA.portable.InputStream _is = null;
564                            try
565                            {
566                                    org.omg.CORBA.portable.OutputStream _os = _request( "synchronize", true);
567                                    tecgraf.openbus.DRMAA.StringListHelper.write(_os,jobList);
568                                    _os.write_longlong(timeout);
569                                    _os.write_boolean(dispose);
570                                    _is = _invoke(_os);
571                                    return;
572                            }
573                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
574                            catch( org.omg.CORBA.portable.ApplicationException _ax )
575                            {
576                                    String _id = _ax.getId();
577                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidJobException:1.0"))
578                                    {
579                                            throw tecgraf.openbus.DRMAA.InvalidJobExceptionHelper.read(_ax.getInputStream());
580                                    }
581                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
582                                    {
583                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
584                                    }
585                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
586                                    {
587                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
588                                    }
589                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
590                                    {
591                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
592                                    }
593                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
594                                    {
595                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
596                                    }
597                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
598                                    {
599                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
600                                    }
601                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
602                                    {
603                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
604                                    }
605                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/ExitTimeoutException:1.0"))
606                                    {
607                                            throw tecgraf.openbus.DRMAA.ExitTimeoutExceptionHelper.read(_ax.getInputStream());
608                                    }
609                                    throw new RuntimeException("Unexpected exception " + _id );
610                            }
611                            finally
612                            {
613                                    this._releaseReply(_is);
614                            }
615                    }
616                    else
617                    {
618                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "synchronize", _opsClass );
619                            if( _so == null )
620                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
621                            SessionOperations _localServant = (SessionOperations)_so.servant;
622                            try
623                            {
624                                    _localServant.synchronize(jobList,timeout,dispose);
625                            }
626                            finally
627                            {
628                                    _servant_postinvoke(_so);
629                            }
630                            return;
631                    }
632    
633                    }
634    
635            }
636    
637            public tecgraf.openbus.DRMAA.JobTemplate createJobTemplate() throws tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.InternalException
638            {
639                    while(true)
640                    {
641                    if(! this._is_local())
642                    {
643                            org.omg.CORBA.portable.InputStream _is = null;
644                            try
645                            {
646                                    org.omg.CORBA.portable.OutputStream _os = _request( "createJobTemplate", true);
647                                    _is = _invoke(_os);
648                                    tecgraf.openbus.DRMAA.JobTemplate _result = (tecgraf.openbus.DRMAA.JobTemplate)((org.omg.CORBA_2_3.portable.InputStream)_is).read_value ("IDL:tecgraf/openbus/DRMAA/JobTemplate:1.0");
649                                    return _result;
650                            }
651                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
652                            catch( org.omg.CORBA.portable.ApplicationException _ax )
653                            {
654                                    String _id = _ax.getId();
655                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
656                                    {
657                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
658                                    }
659                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
660                                    {
661                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
662                                    }
663                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
664                                    {
665                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
666                                    }
667                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
668                                    {
669                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
670                                    }
671                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
672                                    {
673                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
674                                    }
675                                    throw new RuntimeException("Unexpected exception " + _id );
676                            }
677                            finally
678                            {
679                                    this._releaseReply(_is);
680                            }
681                    }
682                    else
683                    {
684                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "createJobTemplate", _opsClass );
685                            if( _so == null )
686                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
687                            SessionOperations _localServant = (SessionOperations)_so.servant;
688                            tecgraf.openbus.DRMAA.JobTemplate _result;
689                            try
690                            {
691                                    _result = _localServant.createJobTemplate();
692                            }
693                            finally
694                            {
695                                    _servant_postinvoke(_so);
696                            }
697                            return _result;
698                    }
699    
700                    }
701    
702            }
703    
704            public void deleteJobTemplate(tecgraf.openbus.DRMAA.JobTemplate jobTemplate_) throws tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.InvalidArgumentException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.InvalidJobTemplateException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.InternalException
705            {
706                    while(true)
707                    {
708                    if(! this._is_local())
709                    {
710                            org.omg.CORBA.portable.InputStream _is = null;
711                            try
712                            {
713                                    org.omg.CORBA.portable.OutputStream _os = _request( "deleteJobTemplate", true);
714                                    ((org.omg.CORBA_2_3.portable.OutputStream)_os).write_value (jobTemplate_);
715                                    _is = _invoke(_os);
716                                    return;
717                            }
718                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
719                            catch( org.omg.CORBA.portable.ApplicationException _ax )
720                            {
721                                    String _id = _ax.getId();
722                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
723                                    {
724                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
725                                    }
726                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
727                                    {
728                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
729                                    }
730                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
731                                    {
732                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
733                                    }
734                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
735                                    {
736                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
737                                    }
738                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidJobTemplateException:1.0"))
739                                    {
740                                            throw tecgraf.openbus.DRMAA.InvalidJobTemplateExceptionHelper.read(_ax.getInputStream());
741                                    }
742                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
743                                    {
744                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
745                                    }
746                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
747                                    {
748                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
749                                    }
750                                    throw new RuntimeException("Unexpected exception " + _id );
751                            }
752                            finally
753                            {
754                                    this._releaseReply(_is);
755                            }
756                    }
757                    else
758                    {
759                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "deleteJobTemplate", _opsClass );
760                            if( _so == null )
761                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
762                            SessionOperations _localServant = (SessionOperations)_so.servant;
763                            try
764                            {
765                                    _localServant.deleteJobTemplate(jobTemplate_);
766                            }
767                            finally
768                            {
769                                    _servant_postinvoke(_so);
770                            }
771                            return;
772                    }
773    
774                    }
775    
776            }
777    
778            public void init(java.lang.String contactString) throws tecgraf.openbus.DRMAA.InvalidContactStringException,tecgraf.openbus.DRMAA.NoDefaultContactStringSelectedException,tecgraf.openbus.DRMAA.DefaultContactStringException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.InternalException,tecgraf.openbus.DRMAA.DrmsInitException,tecgraf.openbus.DRMAA.AlreadyActiveSessionException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.InvalidArgumentException
779            {
780                    while(true)
781                    {
782                    if(! this._is_local())
783                    {
784                            org.omg.CORBA.portable.InputStream _is = null;
785                            try
786                            {
787                                    org.omg.CORBA.portable.OutputStream _os = _request( "init", true);
788                                    _os.write_string(contactString);
789                                    _is = _invoke(_os);
790                                    return;
791                            }
792                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
793                            catch( org.omg.CORBA.portable.ApplicationException _ax )
794                            {
795                                    String _id = _ax.getId();
796                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidContactStringException:1.0"))
797                                    {
798                                            throw tecgraf.openbus.DRMAA.InvalidContactStringExceptionHelper.read(_ax.getInputStream());
799                                    }
800                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoDefaultContactStringSelectedException:1.0"))
801                                    {
802                                            throw tecgraf.openbus.DRMAA.NoDefaultContactStringSelectedExceptionHelper.read(_ax.getInputStream());
803                                    }
804                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DefaultContactStringException:1.0"))
805                                    {
806                                            throw tecgraf.openbus.DRMAA.DefaultContactStringExceptionHelper.read(_ax.getInputStream());
807                                    }
808                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
809                                    {
810                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
811                                    }
812                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
813                                    {
814                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
815                                    }
816                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
817                                    {
818                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
819                                    }
820                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmsInitException:1.0"))
821                                    {
822                                            throw tecgraf.openbus.DRMAA.DrmsInitExceptionHelper.read(_ax.getInputStream());
823                                    }
824                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AlreadyActiveSessionException:1.0"))
825                                    {
826                                            throw tecgraf.openbus.DRMAA.AlreadyActiveSessionExceptionHelper.read(_ax.getInputStream());
827                                    }
828                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
829                                    {
830                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
831                                    }
832                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
833                                    {
834                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
835                                    }
836                                    throw new RuntimeException("Unexpected exception " + _id );
837                            }
838                            finally
839                            {
840                                    this._releaseReply(_is);
841                            }
842                    }
843                    else
844                    {
845                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "init", _opsClass );
846                            if( _so == null )
847                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
848                            SessionOperations _localServant = (SessionOperations)_so.servant;
849                            try
850                            {
851                                    _localServant.init(contactString);
852                            }
853                            finally
854                            {
855                                    _servant_postinvoke(_so);
856                            }
857                            return;
858                    }
859    
860                    }
861    
862            }
863    
864            public java.lang.String drmaaImplementation()
865            {
866                    while(true)
867                    {
868                    if(! this._is_local())
869                    {
870                            org.omg.CORBA.portable.InputStream _is = null;
871                            try
872                            {
873                                    org.omg.CORBA.portable.OutputStream _os = _request("_get_drmaaImplementation",true);
874                                    _is = _invoke(_os);
875                                    return _is.read_string();
876                            }
877                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
878                            catch( org.omg.CORBA.portable.ApplicationException _ax )
879                            {
880                                    String _id = _ax.getId();
881                                    throw new RuntimeException("Unexpected exception " + _id );
882                            }
883                            finally
884                            {
885                                    this._releaseReply(_is);
886                            }
887                    }
888    
889                    else
890                    {
891                    org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "_get_drmaaImplementation", _opsClass);
892                    if( _so == null )
893                            throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
894                            SessionOperations _localServant = (SessionOperations)_so.servant;
895                            java.lang.String _result;
896                    try
897                    {
898                            _result = _localServant.drmaaImplementation();
899                    }
900                    finally
901                    {
902                            _servant_postinvoke(_so);
903                    }
904                    return _result;
905                    }
906                    }
907    
908            }
909    
910            public void control(java.lang.String jobName, tecgraf.openbus.DRMAA.JobControlAction operation) throws tecgraf.openbus.DRMAA.SuspendInconsistentStateException,tecgraf.openbus.DRMAA.ReleaseInconsistentStateException,tecgraf.openbus.DRMAA.InvalidJobException,tecgraf.openbus.DRMAA.HoldInconsistentStateException,tecgraf.openbus.DRMAA.DrmCommunicationException,tecgraf.openbus.DRMAA.AuthorizationException,tecgraf.openbus.DRMAA.NoActiveSessionException,tecgraf.openbus.DRMAA.InternalException,tecgraf.openbus.DRMAA.ResumeInconsistentStateException,tecgraf.openbus.DRMAA.OutOfMemoryException,tecgraf.openbus.DRMAA.InvalidArgumentException
911            {
912                    while(true)
913                    {
914                    if(! this._is_local())
915                    {
916                            org.omg.CORBA.portable.InputStream _is = null;
917                            try
918                            {
919                                    org.omg.CORBA.portable.OutputStream _os = _request( "control", true);
920                                    _os.write_string(jobName);
921                                    tecgraf.openbus.DRMAA.JobControlActionHelper.write(_os,operation);
922                                    _is = _invoke(_os);
923                                    return;
924                            }
925                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
926                            catch( org.omg.CORBA.portable.ApplicationException _ax )
927                            {
928                                    String _id = _ax.getId();
929                                    if( _id.equals("IDL:tecgraf/openbus/DRMAA/SuspendInconsistentStateException:1.0"))
930                                    {
931                                            throw tecgraf.openbus.DRMAA.SuspendInconsistentStateExceptionHelper.read(_ax.getInputStream());
932                                    }
933                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/ReleaseInconsistentStateException:1.0"))
934                                    {
935                                            throw tecgraf.openbus.DRMAA.ReleaseInconsistentStateExceptionHelper.read(_ax.getInputStream());
936                                    }
937                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidJobException:1.0"))
938                                    {
939                                            throw tecgraf.openbus.DRMAA.InvalidJobExceptionHelper.read(_ax.getInputStream());
940                                    }
941                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/HoldInconsistentStateException:1.0"))
942                                    {
943                                            throw tecgraf.openbus.DRMAA.HoldInconsistentStateExceptionHelper.read(_ax.getInputStream());
944                                    }
945                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/DrmCommunicationException:1.0"))
946                                    {
947                                            throw tecgraf.openbus.DRMAA.DrmCommunicationExceptionHelper.read(_ax.getInputStream());
948                                    }
949                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/AuthorizationException:1.0"))
950                                    {
951                                            throw tecgraf.openbus.DRMAA.AuthorizationExceptionHelper.read(_ax.getInputStream());
952                                    }
953                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/NoActiveSessionException:1.0"))
954                                    {
955                                            throw tecgraf.openbus.DRMAA.NoActiveSessionExceptionHelper.read(_ax.getInputStream());
956                                    }
957                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InternalException:1.0"))
958                                    {
959                                            throw tecgraf.openbus.DRMAA.InternalExceptionHelper.read(_ax.getInputStream());
960                                    }
961                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/ResumeInconsistentStateException:1.0"))
962                                    {
963                                            throw tecgraf.openbus.DRMAA.ResumeInconsistentStateExceptionHelper.read(_ax.getInputStream());
964                                    }
965                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/OutOfMemoryException:1.0"))
966                                    {
967                                            throw tecgraf.openbus.DRMAA.OutOfMemoryExceptionHelper.read(_ax.getInputStream());
968                                    }
969                                    else if( _id.equals("IDL:tecgraf/openbus/DRMAA/InvalidArgumentException:1.0"))
970                                    {
971                                            throw tecgraf.openbus.DRMAA.InvalidArgumentExceptionHelper.read(_ax.getInputStream());
972                                    }
973                                    throw new RuntimeException("Unexpected exception " + _id );
974                            }
975                            finally
976                            {
977                                    this._releaseReply(_is);
978                            }
979                    }
980                    else
981                    {
982                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "control", _opsClass );
983                            if( _so == null )
984                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
985                            SessionOperations _localServant = (SessionOperations)_so.servant;
986                            try
987                            {
988                                    _localServant.control(jobName,operation);
989                            }
990                            finally
991                            {
992                                    _servant_postinvoke(_so);
993                            }
994                            return;
995                    }
996    
997                    }
998    
999            }
1000    
1001    }