1 15 package org.apache.hivemind.impl; 16 17 import java.util.List ; 18 import java.util.Locale ; 19 20 import org.apache.hivemind.Messages; 21 import org.apache.hivemind.Registry; 22 import org.apache.hivemind.internal.Module; 23 import org.apache.hivemind.internal.RegistryInfrastructure; 24 25 31 public class RegistryImpl implements Registry 32 { 33 private RegistryInfrastructure _infrastructure; 34 35 public RegistryImpl(RegistryInfrastructure infrastructure) 36 { 37 _infrastructure = infrastructure; 38 } 39 40 public boolean containsConfiguration(String configurationId) 41 { 42 return _infrastructure.containsConfiguration(configurationId, null); 43 } 44 45 public boolean containsService(Class serviceInterface) 46 { 47 return _infrastructure.containsService(serviceInterface, null); 48 } 49 50 public boolean containsService(String serviceId, Class serviceInterface) 51 { 52 return _infrastructure.containsService(serviceId, serviceInterface, null); 53 } 54 55 public Object getConfiguration(Class configurationType) 56 { 57 return _infrastructure.getConfiguration(configurationType, null); 58 } 59 60 public Object getConfiguration(String configurationId) 61 { 62 return _infrastructure.getConfiguration(configurationId, null); 63 } 64 65 public Object getService(String serviceId, Class serviceInterface) 66 { 67 return _infrastructure.getService(serviceId, serviceInterface, null); 68 } 69 70 public Object getService(Class serviceInterface) 71 { 72 return _infrastructure.getService(serviceInterface, null); 73 } 74 75 public Locale getLocale() 76 { 77 return _infrastructure.getLocale(); 78 } 79 80 public void shutdown() 81 { 82 _infrastructure.shutdown(); 83 } 84 85 public void cleanupThread() 86 { 87 _infrastructure.cleanupThread(); 88 } 89 90 91 public void setupThread() 92 { 93 _infrastructure.setupThread(); 94 } 95 96 99 public List getServiceIds(Class serviceInterface) 100 { 101 return _infrastructure.getServiceIds(serviceInterface); 102 } 103 104 107 public Messages getModuleMessages(String moduleId) 108 { 109 final Module module = _infrastructure.getModule(moduleId); 110 return module == null ? null : module.getMessages(); 111 } 112 113 } | Popular Tags |