1 package com.sun.corba.se.impl.resolver ; 2 3 import com.sun.corba.se.spi.resolver.Resolver ; 4 5 import com.sun.corba.se.spi.orb.Operation ; 6 7 public class ORBDefaultInitRefResolverImpl implements Resolver { 8 Operation urlHandler ; 9 String orbDefaultInitRef ; 10 11 public ORBDefaultInitRefResolverImpl( Operation urlHandler, String orbDefaultInitRef ) 12 { 13 this.urlHandler = urlHandler ; 14 15 this.orbDefaultInitRef = orbDefaultInitRef ; 17 } 18 19 public org.omg.CORBA.Object resolve( String ident ) 20 { 21 if( orbDefaultInitRef == null ) { 23 return null; 24 } 25 26 String urlString; 27 if( orbDefaultInitRef.startsWith( "corbaloc:" ) ) { 32 urlString = orbDefaultInitRef + "/" + ident; 33 } else { 34 urlString = orbDefaultInitRef + "#" + ident; 35 } 36 37 return (org.omg.CORBA.Object )urlHandler.operate( urlString ) ; 38 } 39 40 public java.util.Set list() 41 { 42 return new java.util.HashSet () ; 43 } 44 } 45 | Popular Tags |