Clover coverage report - Code Coverage for hivemind release 1.0-beta-2
Coverage timestamp: Sun Aug 1 2004 14:03:45 EDT
file stats: LOC: 131   Methods: 0
NCLOC: 19   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
RegistryInfrastructure.java - - - -
coverage
 1   
 //  Copyright 2004 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.internal;
 16   
 
 17   
 import java.util.List;
 18   
 import java.util.Locale;
 19   
 
 20   
 import org.apache.hivemind.ErrorHandler;
 21   
 import org.apache.hivemind.Location;
 22   
 import org.apache.hivemind.schema.Translator;
 23   
 
 24   
 /**
 25   
  * Extension of {@link org.apache.hivemind.Registry} provided by some
 26   
  * internals of HiveMind to fasciliate the creation of services and
 27   
  * configurations.
 28   
  *
 29   
  * @author Howard Lewis Ship
 30   
  */
 31   
 public interface RegistryInfrastructure
 32   
 {
 33   
     /**
 34   
      * Obtains a service from the registry. Typically, what's returned is a proxy, 
 35   
      * but that's irrelevant to the caller, which simply will invoke methods
 36   
      * of the service interface.
 37   
      * 
 38   
      * @param serviceId the fully qualified id of the service to obtain
 39   
      * @param serviceInterface the class to which the service will be cast
 40   
      * @return the service
 41   
      * @throws ApplicationRuntimeException if the service does not exist, or if
 42   
      * it can't be cast to the specified service interface
 43   
      */
 44   
 
 45   
     public Object getService(String serviceId, Class serviceInterface);
 46   
 
 47   
     /**
 48   
      * Finds a service that implements the provided interface. Exactly one such service may exist or an exception is thrown.
 49   
      * 
 50   
      * @param serviceInterface used to locate the service
 51   
      */
 52   
     public Object getService(Class serviceInterface);
 53   
 
 54   
     /**
 55   
      * Returns the converted items contributed to the configuration point.
 56   
      * 
 57   
      * @param configurationId the fully qualified id of the configuration
 58   
      * @returns List of converted elements
 59   
      * @throws org.apache.hivemind.ApplicationRuntimeException if no such configuration extension point exists
 60   
      */
 61   
 
 62   
     public List getConfiguration(String configurationId);
 63   
 
 64   
     /**
 65   
      * Returns the configuration point.
 66   
      * 
 67   
      * @param configurationId the fully qualified id of the configuration
 68   
      * @return ConfigurationPoint matching the configuration id
 69   
      * @throws org.apache.hivemind.ApplicationRuntimeException if the configurationId does not exist
 70   
      */
 71   
 
 72   
     public ConfigurationPoint getConfigurationPoint(String configurationId);
 73   
 
 74   
     /**
 75   
      * Returns the identified service extension point.
 76   
      * 
 77   
      * @param serviceId fully qualified id of the service point
 78   
      * @throws org.apache.hivemind.ApplicationRuntimeException if no such service extension point exists
 79   
      */
 80   
 
 81   
     public ServicePoint getServicePoint(String serviceId);
 82   
 
 83   
     /**
 84   
      * Expands any substitution symbols in the input string, replacing
 85   
      * each symbol with the symbols value (if known).  If a symbol
 86   
      * is unknown, then the symbol is passed
 87   
      * through unchanged (complete with the <code>${</code> and <code>}</code>
 88   
      * delimiters) and an error is logged.
 89   
      * 
 90   
      * @param input input string to be converted, which may (or may not) contain
 91   
      * any symbols.
 92   
      * @param location the location from which the string was obtained, used if
 93   
      * an error is logged.
 94   
      */
 95   
 
 96   
     public String expandSymbols(String input, Location location);
 97   
 
 98   
     /**
 99   
      * Returns a named service-model factory
 100   
      */
 101   
 
 102   
     public ServiceModelFactory getServiceModelFactory(String name);
 103   
 
 104   
     /**
 105   
      * Gets a {@link Translator} instance. The Translator may be a shared, cached
 106   
      * instance (Translators should be stateless).  Translators are identified by a constructor, which
 107   
      * may be the name of a translator defined in the <code>hivemind.Translators</code>
 108   
      * extension point (a single builtin translator, <code>class</code>,
 109   
      * is hardcoded).  Alternately, the name may consist of a translator name, a comma, and an 
 110   
      * initializer string for the service (example: <code>int,min=5</code>). 
 111   
      * 
 112   
      * @param constructor the name and optional initialization of a Translator
 113   
      * @return a {@link Translator} instance
 114   
      * @throws ApplicationRuntimeException if the translator can not be constructed (i.e., the name
 115   
      * is not known) 
 116   
      */
 117   
     public Translator getTranslator(String translator);
 118   
 
 119   
     /**
 120   
      * Returns the locale for which the registry was created.
 121   
      */
 122   
 
 123   
     public Locale getLocale();
 124   
 
 125   
     /**
 126   
      * Returns the {@link org.apache.hivemind.ErrorHandler} for this Registry.
 127   
      */
 128   
 
 129   
     public ErrorHandler getErrorHander();
 130   
 }
 131