2009/04/15 - Apache HiveMind has been retired.

For more information, please explore the Attic.

Clover coverage report - Code Coverage for hivemind release 1.2.1
Coverage timestamp: Fri Feb 10 2006 16:33:43 PST
file stats: LOC: 129   Methods: 17
NCLOC: 81   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RegistryImpl.java 50% 77.8% 76.5% 75.7%
coverage coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.hivemind.impl;
 16   
 17    import java.util.List;
 18    import java.util.Locale;
 19    import java.util.Map;
 20   
 21    import org.apache.hivemind.Location;
 22    import org.apache.hivemind.Messages;
 23    import org.apache.hivemind.Registry;
 24    import org.apache.hivemind.internal.Module;
 25    import org.apache.hivemind.internal.RegistryInfrastructure;
 26   
 27    /**
 28    * Implementation of {@link org.apache.hivemind.Registry} that delegates to an instance of
 29    * {@link org.apache.hivemind.internal.RegistryInfrastructure}.
 30    *
 31    * @since 1.1
 32    */
 33    public class RegistryImpl implements Registry
 34    {
 35    private RegistryInfrastructure _infrastructure;
 36   
 37  122 public RegistryImpl(RegistryInfrastructure infrastructure)
 38    {
 39  122 _infrastructure = infrastructure;
 40    }
 41   
 42  2 public boolean containsConfiguration(String configurationId)
 43    {
 44  2 return _infrastructure.containsConfiguration(configurationId, null);
 45    }
 46   
 47  2 public boolean containsService(Class serviceInterface)
 48    {
 49  2 return _infrastructure.containsService(serviceInterface, null);
 50    }
 51   
 52  3 public boolean containsService(String serviceId, Class serviceInterface)
 53    {
 54  3 return _infrastructure.containsService(serviceId, serviceInterface, null);
 55    }
 56   
 57  37 public List getConfiguration(String configurationId)
 58    {
 59  37 return _infrastructure.getConfiguration(configurationId, null);
 60    }
 61   
 62  0 public boolean isConfigurationMappable(String configurationId)
 63    {
 64  0 return _infrastructure.isConfigurationMappable(configurationId, null);
 65    }
 66   
 67  0 public Map getConfigurationAsMap(String configurationId)
 68    {
 69  0 return _infrastructure.getConfigurationAsMap(configurationId, null);
 70    }
 71   
 72  1 public String expandSymbols(String input, Location location)
 73    {
 74  1 return _infrastructure.expandSymbols(input, location);
 75    }
 76   
 77  77 public Object getService(String serviceId, Class serviceInterface)
 78    {
 79  77 return _infrastructure.getService(serviceId, serviceInterface, null);
 80    }
 81   
 82  11 public Object getService(Class serviceInterface)
 83    {
 84  11 return _infrastructure.getService(serviceInterface, null);
 85    }
 86   
 87  3 public Locale getLocale()
 88    {
 89  3 return _infrastructure.getLocale();
 90    }
 91   
 92  29 public void shutdown()
 93    {
 94  29 _infrastructure.shutdown();
 95    }
 96   
 97  11993 public void cleanupThread()
 98    {
 99  11979 _infrastructure.cleanupThread();
 100    }
 101   
 102  0 public String valueForSymbol(String name)
 103    {
 104  0 return _infrastructure.valueForSymbol(name);
 105    }
 106   
 107    /** @since 1.1 */
 108  2 public void setupThread()
 109    {
 110  2 _infrastructure.setupThread();
 111    }
 112   
 113    /**
 114    * @since 1.1
 115    */
 116  0 public List getServiceIds(Class serviceInterface)
 117    {
 118  0 return _infrastructure.getServiceIds(serviceInterface);
 119    }
 120   
 121    /**
 122    * @since 1.1
 123    */
 124  1 public Messages getModuleMessages(String moduleId)
 125    {
 126  1 final Module module = _infrastructure.getModule(moduleId);
 127  1 return module == null ? null : module.getMessages();
 128    }
 129    }