1 24 25 package org.objectweb.dream.adl; 26 27 import java.util.HashMap ; 28 import java.util.Map ; 29 30 import org.objectweb.fractal.adl.ADLException; 31 import org.objectweb.fractal.adl.Factory; 32 33 36 public final class ReconfigurationFactory 37 { 38 39 40 public static final String FACTORY_NAME = "org.objectweb.dream.adl.ReconfFactory"; 41 42 43 public static final String FRACTAL_BACKEND = "org.objectweb.dream.adl.ReconfFractalBackend"; 44 45 static Reconfiguration reconf = null; 46 47 private ReconfigurationFactory() 48 { 49 } 50 51 59 public static Reconfiguration getReconfiguration() throws ADLException 60 { 61 if (reconf == null) 62 { 63 Map context = new HashMap (); 64 context.put("backend", FRACTAL_BACKEND); 65 Factory f = org.objectweb.fractal.adl.FactoryFactory.getFactory(); 66 Map c = (Map ) f.newComponent(FACTORY_NAME, context); 67 reconf = (Reconfiguration) c.get("reconfiguration"); 68 } 69 return reconf; 70 } 71 72 } | Popular Tags |