1 7 8 package com.sun.corba.se.impl.resolver ; 9 10 import com.sun.corba.se.spi.resolver.LocalResolver ; 11 import com.sun.corba.se.spi.orbutil.closure.Closure ; 12 13 public class LocalResolverImpl implements LocalResolver { 14 java.util.Map nameToClosure = new java.util.HashMap () ; 15 16 public synchronized org.omg.CORBA.Object resolve( String name ) 17 { 18 Closure cl = (Closure)nameToClosure.get( name ) ; 19 if (cl == null) 20 return null ; 21 22 return (org.omg.CORBA.Object )(cl.evaluate()) ; 23 } 24 25 public synchronized java.util.Set list() 26 { 27 return nameToClosure.keySet() ; 28 } 29 30 public synchronized void register( String name, Closure closure ) 31 { 32 nameToClosure.put( name, closure ) ; 33 } 34 } 35 | Popular Tags |