00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 package cast.examples.autogen;
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00026 public final class WordServerPrxHelper extends Ice.ObjectPrxHelperBase implements WordServerPrx
00027 {
00028 public String
00029 getNewWord()
00030 {
00031 return getNewWord(null, false);
00032 }
00033
00034 public String
00035 getNewWord(java.util.Map<String, String> __ctx)
00036 {
00037 return getNewWord(__ctx, true);
00038 }
00039
00040 private String
00041 getNewWord(java.util.Map<String, String> __ctx, boolean __explicitCtx)
00042 {
00043 if(__explicitCtx && __ctx == null)
00044 {
00045 __ctx = _emptyContext;
00046 }
00047 int __cnt = 0;
00048 while(true)
00049 {
00050 Ice._ObjectDel __delBase = null;
00051 try
00052 {
00053 __checkTwowayOnly("getNewWord");
00054 __delBase = __getDelegate(false);
00055 _WordServerDel __del = (_WordServerDel)__delBase;
00056 return __del.getNewWord(__ctx);
00057 }
00058 catch(IceInternal.LocalExceptionWrapper __ex)
00059 {
00060 __handleExceptionWrapper(__delBase, __ex);
00061 }
00062 catch(Ice.LocalException __ex)
00063 {
00064 __cnt = __handleException(__delBase, __ex, null, __cnt);
00065 }
00066 }
00067 }
00068
00069 private static final String __getNewWord_name = "getNewWord";
00070
00071 public Ice.AsyncResult begin_getNewWord()
00072 {
00073 return begin_getNewWord(null, false, null);
00074 }
00075
00076 public Ice.AsyncResult begin_getNewWord(java.util.Map<String, String> __ctx)
00077 {
00078 return begin_getNewWord(__ctx, true, null);
00079 }
00080
00081 public Ice.AsyncResult begin_getNewWord(Ice.Callback __cb)
00082 {
00083 return begin_getNewWord(null, false, __cb);
00084 }
00085
00086 public Ice.AsyncResult begin_getNewWord(java.util.Map<String, String> __ctx, Ice.Callback __cb)
00087 {
00088 return begin_getNewWord(__ctx, true, __cb);
00089 }
00090
00091 public Ice.AsyncResult begin_getNewWord(Callback_WordServer_getNewWord __cb)
00092 {
00093 return begin_getNewWord(null, false, __cb);
00094 }
00095
00096 public Ice.AsyncResult begin_getNewWord(java.util.Map<String, String> __ctx, Callback_WordServer_getNewWord __cb)
00097 {
00098 return begin_getNewWord(__ctx, true, __cb);
00099 }
00100
00101 private Ice.AsyncResult begin_getNewWord(java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb)
00102 {
00103 __checkAsyncTwowayOnly(__getNewWord_name);
00104 IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __getNewWord_name, __cb);
00105 try
00106 {
00107 __result.__prepare(__getNewWord_name, Ice.OperationMode.Normal, __ctx, __explicitCtx);
00108 IceInternal.BasicStream __os = __result.__os();
00109 __os.endWriteEncaps();
00110 __result.__send(true);
00111 }
00112 catch(Ice.LocalException __ex)
00113 {
00114 __result.__exceptionAsync(__ex);
00115 }
00116 return __result;
00117 }
00118
00119 public String end_getNewWord(Ice.AsyncResult __result)
00120 {
00121 Ice.AsyncResult.__check(__result, this, __getNewWord_name);
00122 if(!__result.__wait())
00123 {
00124 try
00125 {
00126 __result.__throwUserException();
00127 }
00128 catch(Ice.UserException __ex)
00129 {
00130 throw new Ice.UnknownUserException(__ex.ice_name());
00131 }
00132 }
00133 String __ret;
00134 IceInternal.BasicStream __is = __result.__is();
00135 __is.startReadEncaps();
00136 __ret = __is.readString();
00137 __is.endReadEncaps();
00138 return __ret;
00139 }
00140
00141 public static WordServerPrx
00142 checkedCast(Ice.ObjectPrx __obj)
00143 {
00144 WordServerPrx __d = null;
00145 if(__obj != null)
00146 {
00147 try
00148 {
00149 __d = (WordServerPrx)__obj;
00150 }
00151 catch(ClassCastException ex)
00152 {
00153 if(__obj.ice_isA("::cast::examples::autogen::WordServer"))
00154 {
00155 WordServerPrxHelper __h = new WordServerPrxHelper();
00156 __h.__copyFrom(__obj);
00157 __d = __h;
00158 }
00159 }
00160 }
00161 return __d;
00162 }
00163
00164 public static WordServerPrx
00165 checkedCast(Ice.ObjectPrx __obj, java.util.Map<String, String> __ctx)
00166 {
00167 WordServerPrx __d = null;
00168 if(__obj != null)
00169 {
00170 try
00171 {
00172 __d = (WordServerPrx)__obj;
00173 }
00174 catch(ClassCastException ex)
00175 {
00176 if(__obj.ice_isA("::cast::examples::autogen::WordServer", __ctx))
00177 {
00178 WordServerPrxHelper __h = new WordServerPrxHelper();
00179 __h.__copyFrom(__obj);
00180 __d = __h;
00181 }
00182 }
00183 }
00184 return __d;
00185 }
00186
00187 public static WordServerPrx
00188 checkedCast(Ice.ObjectPrx __obj, String __facet)
00189 {
00190 WordServerPrx __d = null;
00191 if(__obj != null)
00192 {
00193 Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
00194 try
00195 {
00196 if(__bb.ice_isA("::cast::examples::autogen::WordServer"))
00197 {
00198 WordServerPrxHelper __h = new WordServerPrxHelper();
00199 __h.__copyFrom(__bb);
00200 __d = __h;
00201 }
00202 }
00203 catch(Ice.FacetNotExistException ex)
00204 {
00205 }
00206 }
00207 return __d;
00208 }
00209
00210 public static WordServerPrx
00211 checkedCast(Ice.ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx)
00212 {
00213 WordServerPrx __d = null;
00214 if(__obj != null)
00215 {
00216 Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
00217 try
00218 {
00219 if(__bb.ice_isA("::cast::examples::autogen::WordServer", __ctx))
00220 {
00221 WordServerPrxHelper __h = new WordServerPrxHelper();
00222 __h.__copyFrom(__bb);
00223 __d = __h;
00224 }
00225 }
00226 catch(Ice.FacetNotExistException ex)
00227 {
00228 }
00229 }
00230 return __d;
00231 }
00232
00233 public static WordServerPrx
00234 uncheckedCast(Ice.ObjectPrx __obj)
00235 {
00236 WordServerPrx __d = null;
00237 if(__obj != null)
00238 {
00239 try
00240 {
00241 __d = (WordServerPrx)__obj;
00242 }
00243 catch(ClassCastException ex)
00244 {
00245 WordServerPrxHelper __h = new WordServerPrxHelper();
00246 __h.__copyFrom(__obj);
00247 __d = __h;
00248 }
00249 }
00250 return __d;
00251 }
00252
00253 public static WordServerPrx
00254 uncheckedCast(Ice.ObjectPrx __obj, String __facet)
00255 {
00256 WordServerPrx __d = null;
00257 if(__obj != null)
00258 {
00259 Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
00260 WordServerPrxHelper __h = new WordServerPrxHelper();
00261 __h.__copyFrom(__bb);
00262 __d = __h;
00263 }
00264 return __d;
00265 }
00266
00267 protected Ice._ObjectDelM
00268 __createDelegateM()
00269 {
00270 return new _WordServerDelM();
00271 }
00272
00273 protected Ice._ObjectDelD
00274 __createDelegateD()
00275 {
00276 return new _WordServerDelD();
00277 }
00278
00279 public static void
00280 __write(IceInternal.BasicStream __os, WordServerPrx v)
00281 {
00282 __os.writeProxy(v);
00283 }
00284
00285 public static WordServerPrx
00286 __read(IceInternal.BasicStream __is)
00287 {
00288 Ice.ObjectPrx proxy = __is.readProxy();
00289 if(proxy != null)
00290 {
00291 WordServerPrxHelper result = new WordServerPrxHelper();
00292 result.__copyFrom(proxy);
00293 return result;
00294 }
00295 return null;
00296 }
00297
00298 public static void
00299 write(Ice.OutputStream __outS, WordServerPrx v)
00300 {
00301 __outS.writeProxy(v);
00302 }
00303
00304 public static WordServerPrx
00305 read(Ice.InputStream __inS)
00306 {
00307 Ice.ObjectPrx proxy = __inS.readProxy();
00308 if(proxy != null)
00309 {
00310 WordServerPrxHelper result = new WordServerPrxHelper();
00311 result.__copyFrom(proxy);
00312 return result;
00313 }
00314 return null;
00315 }
00316 }