package erabilgarriak; /** * Generated from IDL interface "Server". * * @author JacORB IDL compiler V 2.3.1, 27-May-2009 * @version generated at Jun 9, 2011 3:02:02 PM */ public class _ServerStub extends org.omg.CORBA.portable.ObjectImpl implements erabilgarriak.Server { private String[] ids = {"IDL:erabilgarriak/Server:1.0"}; public String[] _ids() { return ids; } public final static java.lang.Class _opsClass = erabilgarriak.ServerOperations.class; public boolean register(erabilgarriak.DownloadFile file) { while(true) { if(! this._is_local()) { org.omg.CORBA.portable.InputStream _is = null; org.omg.CORBA.portable.OutputStream _os = null; try { _os = _request( "register", true); erabilgarriak.DownloadFileHelper.write(_os,file); _is = _invoke(_os); boolean _result = _is.read_boolean(); return _result; } catch( org.omg.CORBA.portable.RemarshalException _rx ){} catch( org.omg.CORBA.portable.ApplicationException _ax ) { String _id = _ax.getId(); try { _ax.getInputStream().close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } throw new RuntimeException("Unexpected exception " + _id ); } finally { if (_os != null) { try { _os.close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } } this._releaseReply(_is); } } else { org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "register", _opsClass ); if( _so == null ) throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); ServerOperations _localServant = (ServerOperations)_so.servant; boolean _result; try { _result = _localServant.register(file); } finally { _servant_postinvoke(_so); } return _result; } } } public boolean getFile(erabilgarriak.FileData data, erabilgarriak.ServerPackage.DownloadFileArrayHolder files) { while(true) { if(! this._is_local()) { org.omg.CORBA.portable.InputStream _is = null; org.omg.CORBA.portable.OutputStream _os = null; try { _os = _request( "getFile", true); erabilgarriak.FileDataHelper.write(_os,data); erabilgarriak.ServerPackage.DownloadFileArrayHelper.write(_os,files.value); _is = _invoke(_os); boolean _result = _is.read_boolean(); files.value = erabilgarriak.ServerPackage.DownloadFileArrayHelper.read(_is); return _result; } catch( org.omg.CORBA.portable.RemarshalException _rx ){} catch( org.omg.CORBA.portable.ApplicationException _ax ) { String _id = _ax.getId(); try { _ax.getInputStream().close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } throw new RuntimeException("Unexpected exception " + _id ); } finally { if (_os != null) { try { _os.close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } } this._releaseReply(_is); } } else { org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "getFile", _opsClass ); if( _so == null ) throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); ServerOperations _localServant = (ServerOperations)_so.servant; boolean _result; try { _result = _localServant.getFile(data,files); } finally { _servant_postinvoke(_so); } return _result; } } } public boolean deregister(erabilgarriak.DownloadFile file) { while(true) { if(! this._is_local()) { org.omg.CORBA.portable.InputStream _is = null; org.omg.CORBA.portable.OutputStream _os = null; try { _os = _request( "deregister", true); erabilgarriak.DownloadFileHelper.write(_os,file); _is = _invoke(_os); boolean _result = _is.read_boolean(); return _result; } catch( org.omg.CORBA.portable.RemarshalException _rx ){} catch( org.omg.CORBA.portable.ApplicationException _ax ) { String _id = _ax.getId(); try { _ax.getInputStream().close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } throw new RuntimeException("Unexpected exception " + _id ); } finally { if (_os != null) { try { _os.close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } } this._releaseReply(_is); } } else { org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "deregister", _opsClass ); if( _so == null ) throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); ServerOperations _localServant = (ServerOperations)_so.servant; boolean _result; try { _result = _localServant.deregister(file); } finally { _servant_postinvoke(_so); } return _result; } } } public boolean getLista(erabilgarriak.ServerPackage.FileDataArrayHolder files) { while(true) { if(! this._is_local()) { org.omg.CORBA.portable.InputStream _is = null; org.omg.CORBA.portable.OutputStream _os = null; try { _os = _request( "getLista", true); erabilgarriak.ServerPackage.FileDataArrayHelper.write(_os,files.value); _is = _invoke(_os); boolean _result = _is.read_boolean(); files.value = erabilgarriak.ServerPackage.FileDataArrayHelper.read(_is); return _result; } catch( org.omg.CORBA.portable.RemarshalException _rx ){} catch( org.omg.CORBA.portable.ApplicationException _ax ) { String _id = _ax.getId(); try { _ax.getInputStream().close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } throw new RuntimeException("Unexpected exception " + _id ); } finally { if (_os != null) { try { _os.close(); } catch (java.io.IOException e) { throw new RuntimeException("Unexpected exception " + e.toString() ); } } this._releaseReply(_is); } } else { org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "getLista", _opsClass ); if( _so == null ) throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); ServerOperations _localServant = (ServerOperations)_so.servant; boolean _result; try { _result = _localServant.getLista(files); } finally { _servant_postinvoke(_so); } return _result; } } } }