312 try { 313 relname.add(relResName); 314 } catch (NamingException e) {} 315 316 setContinue(resObj, relname, currCtx, PartialCompositeContext._NNS_NAME); 317 } 318 319 320 /** 321 * Sets this Continuation with the supplied data, and set remaining name 322 * to be the empty name. 323 * This method is typically called by list-style methods 324 * in which the target context implementing list() expects an 325 * empty name. For example when c_list() is given a non-empty name to 326 * process, it would resolve that name, and then call setContinue() 327 * with the resolved object so that the target context to be listed 328 * would be called with the empty name (i.e. list the target context itself). 329 *<p> 330 * After this method is called, isContinuing() returns true. 331 * 332 * @param resObj The possibly null resolved object. 333 * @param relResName The non-null resolved name relative to currCtx. 334 * @param currCtx The non-null context from which relResName is to be resolved. 335 */ 336 public void setContinue(Object obj, Name relResName, Context currCtx) { 337 setContinueAux(obj, relResName, currCtx, 338 (Name)PartialCompositeContext._EMPTY_NAME.clone()); 339 } 340 341 /** 342 * Sets this Continuation with the supplied data. 343 344 * This method is typically called by a method that has been asked 345 * to operate on a name. The method resolves part of the name 346 * (relResName) to obj and sets the unprocessed part to rename. 347 * It calls setContinue() so that the operation can be continued 348 * using this data. 349 *<p> 350 * After this method is called, isContinuing() returns true. 351 * 352 * @param resObj The possibly null resolved object. 353 * @param relResName The non-null resolved name relative to currCtx. 354 * @param currCtx The non-null context from which relResName is to be resolved. 355 * @param remain The non-null remaining name. 356 */ 357 public void setContinue(Object obj, Name relResName, Context currCtx, Name remain) { 358 if (remain != null) 359 this.remainingName = (Name)(remain.clone()); 360 else 361 this.remainingName = new CompositeName(); 362 363 setContinueAux(obj, relResName, currCtx, remainingName); 364 } 365 366 /** 367 * String overload. 368 * 369 * @param resObj The possibly null resolved object. 370 * @param relResName The non-null resolved name relative to currCtx. 371 * @param currCtx The non-null context from which relResName is to be resolved. 372 * @param remain The non-null remaining name. 373 * @see #setContinue(java.lang.Object, java.lang.String, javax.naming.Context, java.lang.String) 374 */ 375 public void setContinue(Object obj, String relResName, 376 Context currCtx, String remain) { 377 CompositeName relname = new CompositeName(); 378 if (!relResName.equals("")) { 379 try { 380 relname.add(relResName); 381 } catch (NamingException e){} 382 } 383 384 CompositeName rname = new CompositeName(); 385 if (!remain.equals("")) { 386 try { 387 rname.add(remain); 388 } catch (NamingException e) { 389 } | 312 try { 313 relname.add(relResName); 314 } catch (NamingException e) {} 315 316 setContinue(resObj, relname, currCtx, PartialCompositeContext._NNS_NAME); 317 } 318 319 320 /** 321 * Sets this Continuation with the supplied data, and set remaining name 322 * to be the empty name. 323 * This method is typically called by list-style methods 324 * in which the target context implementing list() expects an 325 * empty name. For example when c_list() is given a non-empty name to 326 * process, it would resolve that name, and then call setContinue() 327 * with the resolved object so that the target context to be listed 328 * would be called with the empty name (i.e. list the target context itself). 329 *<p> 330 * After this method is called, isContinuing() returns true. 331 * 332 * @param obj The possibly null resolved object. 333 * @param relResName The non-null resolved name relative to currCtx. 334 * @param currCtx The non-null context from which relResName is to be resolved. 335 */ 336 public void setContinue(Object obj, Name relResName, Context currCtx) { 337 setContinueAux(obj, relResName, currCtx, 338 (Name)PartialCompositeContext._EMPTY_NAME.clone()); 339 } 340 341 /** 342 * Sets this Continuation with the supplied data. 343 344 * This method is typically called by a method that has been asked 345 * to operate on a name. The method resolves part of the name 346 * (relResName) to obj and sets the unprocessed part to rename. 347 * It calls setContinue() so that the operation can be continued 348 * using this data. 349 *<p> 350 * After this method is called, isContinuing() returns true. 351 * 352 * @param obj The possibly null resolved object. 353 * @param relResName The non-null resolved name relative to currCtx. 354 * @param currCtx The non-null context from which relResName is to be resolved. 355 * @param remain The non-null remaining name. 356 */ 357 public void setContinue(Object obj, Name relResName, Context currCtx, Name remain) { 358 if (remain != null) 359 this.remainingName = (Name)(remain.clone()); 360 else 361 this.remainingName = new CompositeName(); 362 363 setContinueAux(obj, relResName, currCtx, remainingName); 364 } 365 366 /** 367 * String overload. 368 * 369 * @param obj The possibly null resolved object. 370 * @param relResName The non-null resolved name relative to currCtx. 371 * @param currCtx The non-null context from which relResName is to be resolved. 372 * @param remain The non-null remaining name. 373 * @see #setContinue(java.lang.Object, java.lang.String, javax.naming.Context, java.lang.String) 374 */ 375 public void setContinue(Object obj, String relResName, 376 Context currCtx, String remain) { 377 CompositeName relname = new CompositeName(); 378 if (!relResName.equals("")) { 379 try { 380 relname.add(relResName); 381 } catch (NamingException e){} 382 } 383 384 CompositeName rname = new CompositeName(); 385 if (!remain.equals("")) { 386 try { 387 rname.add(remain); 388 } catch (NamingException e) { 389 } |