001 package org.omg.CosNaming; 002 003 004 /** 005 * Generated from IDL interface "BindingIterator". 006 * 007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007 008 * @version generated at Jun 18, 2012 10:36:59 AM 009 */ 010 011 public class _BindingIteratorStub 012 extends org.omg.CORBA.portable.ObjectImpl 013 implements org.omg.CosNaming.BindingIterator 014 { 015 private String[] ids = {"IDL:omg.org/CosNaming/BindingIterator:1.0"}; 016 public String[] _ids() 017 { 018 return ids; 019 } 020 021 public final static java.lang.Class _opsClass = org.omg.CosNaming.BindingIteratorOperations.class; 022 public boolean next_one(org.omg.CosNaming.BindingHolder b) 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( "next_one", true); 032 _is = _invoke(_os); 033 boolean _result = _is.read_boolean(); 034 b.value = org.omg.CosNaming.BindingHelper.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 throw new RuntimeException("Unexpected exception " + _id ); 042 } 043 finally 044 { 045 this._releaseReply(_is); 046 } 047 } 048 else 049 { 050 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "next_one", _opsClass ); 051 if( _so == null ) 052 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 053 BindingIteratorOperations _localServant = (BindingIteratorOperations)_so.servant; 054 boolean _result; 055 try 056 { 057 _result = _localServant.next_one(b); 058 } 059 finally 060 { 061 _servant_postinvoke(_so); 062 } 063 return _result; 064 } 065 066 } 067 068 } 069 070 public boolean next_n(int how_many, org.omg.CosNaming.BindingListHolder bl) 071 { 072 while(true) 073 { 074 if(! this._is_local()) 075 { 076 org.omg.CORBA.portable.InputStream _is = null; 077 try 078 { 079 org.omg.CORBA.portable.OutputStream _os = _request( "next_n", true); 080 _os.write_ulong(how_many); 081 _is = _invoke(_os); 082 boolean _result = _is.read_boolean(); 083 bl.value = org.omg.CosNaming.BindingListHelper.read(_is); 084 return _result; 085 } 086 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 087 catch( org.omg.CORBA.portable.ApplicationException _ax ) 088 { 089 String _id = _ax.getId(); 090 throw new RuntimeException("Unexpected exception " + _id ); 091 } 092 finally 093 { 094 this._releaseReply(_is); 095 } 096 } 097 else 098 { 099 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "next_n", _opsClass ); 100 if( _so == null ) 101 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 102 BindingIteratorOperations _localServant = (BindingIteratorOperations)_so.servant; 103 boolean _result; 104 try 105 { 106 _result = _localServant.next_n(how_many,bl); 107 } 108 finally 109 { 110 _servant_postinvoke(_so); 111 } 112 return _result; 113 } 114 115 } 116 117 } 118 119 public void destroy() 120 { 121 while(true) 122 { 123 if(! this._is_local()) 124 { 125 org.omg.CORBA.portable.InputStream _is = null; 126 try 127 { 128 org.omg.CORBA.portable.OutputStream _os = _request( "destroy", true); 129 _is = _invoke(_os); 130 return; 131 } 132 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 133 catch( org.omg.CORBA.portable.ApplicationException _ax ) 134 { 135 String _id = _ax.getId(); 136 throw new RuntimeException("Unexpected exception " + _id ); 137 } 138 finally 139 { 140 this._releaseReply(_is); 141 } 142 } 143 else 144 { 145 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "destroy", _opsClass ); 146 if( _so == null ) 147 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 148 BindingIteratorOperations _localServant = (BindingIteratorOperations)_so.servant; 149 try 150 { 151 _localServant.destroy(); 152 } 153 finally 154 { 155 _servant_postinvoke(_so); 156 } 157 return; 158 } 159 160 } 161 162 } 163 164 }