mcconnell    2002/09/22 00:55:15

  Modified:    meta/src/java/org/apache/excalibur/meta/info/builder
                        SerializedServiceCreator.java ServiceBuilder.java
                        ServiceCreator.java XMLServiceCreator.java
               meta/src/xdocs menu.xml services.xml type.xml
  Log:
  Updates to the package to synchronize with the replacement of "Service" with 
"ServiceDefinition".
  
  Revision  Changes    Path
  1.2       +6 -6      
jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/SerializedServiceCreator.java
  
  Index: SerializedServiceCreator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/SerializedServiceCreator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SerializedServiceCreator.java     12 Sep 2002 06:03:10 -0000      1.1
  +++ SerializedServiceCreator.java     22 Sep 2002 07:55:15 -0000      1.2
  @@ -7,12 +7,12 @@
    */
   package org.apache.excalibur.meta.info.builder;
   
  -import org.apache.excalibur.meta.info.Service;
  +import org.apache.excalibur.meta.info.ServiceDefinition;
   import java.io.InputStream;
   import java.io.ObjectInputStream;
   
   /**
  - * Create [EMAIL PROTECTED] Service} from stream made up of a serialized 
object.
  + * Create [EMAIL PROTECTED] ServiceDefinition} from stream made up of a 
serialized object.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
    * @version $Revision$ $Date$
  @@ -28,10 +28,10 @@
       * @return the meta-info instance that describes the component type
       * @exception Exception if an error occurs
       */
  -    public Service createService( final String key, final InputStream input )
  +    public ServiceDefinition createService( final String key, final 
InputStream input )
           throws Exception
       {
  -        final ObjectInputStream ois = new ObjectInputStream( input );
  -        return (Service)ois.readObject();
  +        final ObjectInputStream stream = new ObjectInputStream( input );
  +        return (ServiceDefinition)stream.readObject();
       }
   }
  
  
  
  1.3       +18 -15    
jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceBuilder.java
  
  Index: ServiceBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServiceBuilder.java       12 Sep 2002 08:07:43 -0000      1.2
  +++ ServiceBuilder.java       22 Sep 2002 07:55:15 -0000      1.3
  @@ -12,12 +12,15 @@
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.excalibur.meta.info.Service;
  +import org.apache.excalibur.meta.info.ServiceDefinition;
   
   /**
  - * A ServiceBuilder is responsible for building [EMAIL PROTECTED] Service}
  + * A ServiceBuilder is responsible for building [EMAIL PROTECTED] 
ServiceDefinition}
    * objects from Configuration objects.
    *
  + * <p><b>UML</b></p>
  + * <p><image src="doc-files/ServiceBuilder.gif" border="0"/></p>
  + *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
    * @version $Revision$ $Date$
    */
  @@ -45,32 +48,32 @@
       }
   
       /**
  -     * Create a [EMAIL PROTECTED] Service} object for specified Class.
  +     * Create a [EMAIL PROTECTED] ServiceDefinition} object for specified 
Class.
        *
        * @param clazz The class of Component
        * @return the created Service
        * @throws Exception if an error occurs
        */
  -    public Service build( final Class clazz )
  +    public ServiceDefinition build( final Class clazz )
           throws Exception
       {
           return build( clazz.getName(), clazz.getClassLoader() );
       }
   
       /**
  -     * Create a [EMAIL PROTECTED] Service} object for specified
  +     * Create a [EMAIL PROTECTED] ServiceDefinition} object for specified
        * classname, in specified ClassLoader.
        *
        * @param classname The classname of Component
        * @param classLoader the ClassLoader to load info from
  -     * @return the created Service
  +     * @return the created ServiceDefinition
        * @throws Exception if an error occurs
        */
  -    public Service build( final String classname,
  +    public ServiceDefinition build( final String classname,
                                   final ClassLoader classLoader )
           throws Exception
       {
  -        final Service info = buildFromSerDescriptor( classname, classLoader 
);
  +        final ServiceDefinition info = buildFromSerDescriptor( classname, 
classLoader );
           if( null != info )
           {
               return info;
  @@ -82,14 +85,14 @@
       }
   
       /**
  -     * Build Service from the XML descriptor format.
  +     * Build ServiceDefinition from the XML descriptor format.
        *
        * @param classname The classname of Component
        * @param classLoader the ClassLoader to load info from
  -     * @return the created Service
  +     * @return the created ServiceDefinition
        * @throws Exception if an error occurs
        */
  -    private Service buildFromSerDescriptor( final String classname,
  +    private ServiceDefinition buildFromSerDescriptor( final String classname,
                                                     final ClassLoader 
classLoader )
           throws Exception
       {
  @@ -106,14 +109,14 @@
       }
   
       /**
  -     * Build Service from the XML descriptor format.
  +     * Build ServiceDefinition from the XML descriptor format.
        *
        * @param classname The classname of Component
        * @param classLoader the ClassLoader to load info from
  -     * @return the created Service
  +     * @return the created ServiceDefinition
        * @throws Exception if an error occurs
        */
  -    private Service buildFromXMLDescriptor( final String classname,
  +    private ServiceDefinition buildFromXMLDescriptor( final String classname,
                                                     final ClassLoader 
classLoader )
           throws Exception
       {
  
  
  
  1.2       +6 -6      
jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceCreator.java
  
  Index: ServiceCreator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceCreator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceCreator.java       12 Sep 2002 05:35:33 -0000      1.1
  +++ ServiceCreator.java       22 Sep 2002 07:55:15 -0000      1.2
  @@ -7,11 +7,11 @@
    */
   package org.apache.excalibur.meta.info.builder;
   
  -import org.apache.excalibur.meta.info.Service;
  +import org.apache.excalibur.meta.info.ServiceDefinition;
   import java.io.InputStream;
   
   /**
  - * Interface used to create a [EMAIL PROTECTED] Service}
  + * Interface used to create a [EMAIL PROTECTED] ServiceDefinition}
    * from a stream.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
  @@ -20,13 +20,13 @@
   public interface ServiceCreator
   {
       /**
  -     * Create a [EMAIL PROTECTED] Service} from stream
  +     * Create a [EMAIL PROTECTED] ServiceDefinition} from stream
        *
        * @param key the name of the service type
        * @param input the input stream that the resource is loaded from
  -     * @return the created [EMAIL PROTECTED] Service}
  +     * @return the created [EMAIL PROTECTED] ServiceDefinition}
        * @exception Exception if an error occurs
        */
  -    Service createService( String key, InputStream input )
  +    ServiceDefinition createService( String key, InputStream input )
           throws Exception;
   }
  
  
  
  1.4       +9 -9      
jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/XMLServiceCreator.java
  
  Index: XMLServiceCreator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/XMLServiceCreator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLServiceCreator.java    12 Sep 2002 15:09:40 -0000      1.3
  +++ XMLServiceCreator.java    22 Sep 2002 07:55:15 -0000      1.4
  @@ -15,13 +15,13 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.excalibur.meta.info.Service;
  +import org.apache.excalibur.meta.info.ServiceDefinition;
   import org.apache.excalibur.meta.ConfigurationBuilder;
   import org.xml.sax.InputSource;
   
   /**
    * Utility class the handles the internalization of an XML description
  - * of a service into a [EMAIL PROTECTED] Service} instance.
  + * of a service into a [EMAIL PROTECTED] ServiceDefinition} instance.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
    * @version $Revision$ $Date$
  @@ -34,14 +34,14 @@
           ResourceManager.getPackageResources( XMLServiceCreator.class );
   
       /**
  -     * Create a [EMAIL PROTECTED] Service} from stream
  +     * Create a [EMAIL PROTECTED] ServiceDefinition} from stream
        *
        * @param key the name of the service type
        * @param input the input stream that the resource is loaded from
  -     * @return the created [EMAIL PROTECTED] Service}
  +     * @return the created [EMAIL PROTECTED] ServiceDefinition}
        * @exception Exception if an error occurs
        */
  -    public Service createService( String key, InputStream input )
  +    public ServiceDefinition createService( String key, InputStream input )
           throws Exception
       {
           if( input == null ) 
  @@ -55,7 +55,7 @@
       }
   
       /**
  -     * Create a [EMAIL PROTECTED] Service} object for a supplied classname 
from
  +     * Create a [EMAIL PROTECTED] ServiceDefinition} object for a supplied 
classname from
        * configuration data.
        *
        * @param classname the classname of the service
  @@ -63,7 +63,7 @@
        * @return the created Service
        * @throws Exception if an error occurs
        */
  -    private Service build( final String classname, final Configuration info )
  +    private ServiceDefinition build( final String classname, final 
Configuration info )
           throws Exception
       {
           if( getLogger().isDebugEnabled() )
  @@ -98,7 +98,7 @@
               getLogger().debug( message );
           }
   
  -        return new Service( classname, version, attributes );
  +        return new ServiceDefinition( classname, version, attributes );
       }
   
       /**
  
  
  
  1.2       +9 -5      jakarta-avalon-excalibur/meta/src/xdocs/menu.xml
  
  Index: menu.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/xdocs/menu.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- menu.xml  25 Aug 2002 02:50:28 -0000      1.1
  +++ menu.xml  22 Sep 2002 07:55:15 -0000      1.2
  @@ -11,19 +11,23 @@
               <item name="Tools" href="tools.html"/>
           </menu>
   
  -        <menu name="Facilities">
  -            <item name="Type Definition" href="type.html"/>
  -            <item name="Logging Criteria" href="logging.html"/>
  -            <item name="Context Criteria" href="context.html"/>
  +        <menu name="Type">
  +            <item name="Type Defintion" href="type.html"/>
  +            <item name="Logging" href="logging.html"/>
  +            <item name="Context" href="context.html"/>
               <item name="Services" href="services.html"/>
               <item name="Dependencies" href="dependencies.html"/>
               <item name="Extensions" href="extensions.html"/>
               <item name="Stages" href="stages.html"/>
           </menu>
   
  +        <menu name="Service">
  +            <item name="Service Definition" href="service.html"/>
  +        </menu>
  +
           <menu name="Links">
               <item name="Mailing List" href="list.html"/>
  -            <item name="Merlin" 
href="http://jakarta.apache.org/avalon/merlin"/>
  +            <item name="Merlin" 
href="http://jakarta.apache.org/avalon/excalibur/merlin"/>
               <item name="Fortress" 
href="http://jakarta.apache.org/avalon/excalibur/fortress"/>
           </menu>
   
  
  
  
  1.2       +21 -13    jakarta-avalon-excalibur/meta/src/xdocs/services.xml
  
  Index: services.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/xdocs/services.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- services.xml      25 Aug 2002 02:50:28 -0000      1.1
  +++ services.xml      22 Sep 2002 07:55:15 -0000      1.2
  @@ -14,7 +14,7 @@
       <s1 title="Introduction">
   
   <p>
  -The org.apache.excalibur.meta.info.ServiceDescriptor class describes the a 
service that a component provides.  Serices represent the value-proposition 
that the component offers to its clients, including other components that my 
declare dependencies that a container will normally resolve in a container 
independent manner.  Services are exposed to clients though a ServiceManager 
(or ComponentManager). The client will typically invoke the <code>lookup</code> 
operation, passing the role name of the to the manager.  The object retured is 
a reference to a component providing the requested service (or a proxy that 
isolates the component from the offered service).  Role names and the services 
that the role refers to are declared in depedency entries within the meta 
model.    
  +The org.apache.excalibur.meta.info.ServiceDescriptor class describes a 
service delivery capability. It contains a reference to ServiceDefinition. 
Service delivery capability represent the value-proposition that the component 
type offers to its clients. Client typically include other component that have 
declared dependencies on the type of service referenced by the 
ServiceDescriptor.  Services supporting dependency requirements are exposed to 
clients though a ServiceManager (or ComponentManager). Services supporting 
lifecycle extensions are applied by a container during the startup, access and 
shutdown phases.  For depedent services, the client will typically invoke the 
<code>lookup</code> operation against the supplied service manager, passing the 
role name of the to the manager.  The object retured is the service (or a proxy 
that isolates the component from the offered service).  Role names and the 
services that the role refers to are declared in depedency entries within the 
meta model.    
   </p>
         <s2 title="XML Schema">
   
  @@ -23,9 +23,9 @@
     <font color="gray"><i>&lt;!--
     Example of a component meta info external XML form 
     for a set of service descriptors within a type. A 
  -  services elememnt containtains 0..n servie elements.
  -  Each service element contains the role name together 
  -  with a version interface reference.
  +  services elememnt containtains 0..n service elements.
  +  Each service element contains a service reference 
  +  (interface name and version).
     --&gt;</i></font>
   
     &lt;type&gt;
  @@ -33,10 +33,11 @@
       <font color="gray"><i>&lt;!--
       Declaration of the set of services that this component is capable 
       of supplying.  Each service declarared under the services element
  -    may be referenced by other component info descriptions as a 
  -    dependecy.  A container is responsible for the assemably of 
  -    components based on the connection of supply components to 
  -    consumer components via a common service description. 
  +    may be referenced by other component types as service dependecies
  +    or lifecycle stage depedencies.  A container is responsible for 
  +    the assembaly of component types based on the connection of 
  +    supply components to consumer components via a common service 
  +    description. 
       --&gt;</i></font>
   
       &lt;services&gt;
  @@ -49,15 +50,22 @@
   
         &lt;service&gt;
   
  -        &lt;reference type="<font color="darkred">SimpleService</font>" 
version="<font color="darkred">3.2</font>"&gt;
  +        <font color="gray"><i>&lt;!-- 
  +        A reference element is a pointer to a formal or implied 
  +        ServiceDefinition.
  +        --&gt;</i></font>
  +
  +        &lt;reference type="<font 
color="darkred">org.apache.SimpleService</font>" version="<font 
color="darkred">3.2</font>"&gt;
   
           &lt;attributes&gt;
   
              <font color="gray"><i>&lt;!--
  -           Service type attributes go here.
  -
  -           Need some relevant examples. 
  +           Attribute declarations may be included to qualify the 
  +           characteristics of the service provided by the component
  +           implementation.
              --&gt;</i></font>
  +
  +           &lt;attribute key="<font color="darkred">a-key</font>" 
value="<font color="darkred">a-value</font>"/&gt;
   
           &lt;/attributes&gt;
   
  
  
  
  1.4       +14 -15    jakarta-avalon-excalibur/meta/src/xdocs/type.xml
  
  Index: type.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/xdocs/type.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- type.xml  13 Sep 2002 15:01:53 -0000      1.3
  +++ type.xml  22 Sep 2002 07:55:15 -0000      1.4
  @@ -3,7 +3,7 @@
   <document>
   
     <header>
  -    <title>Type Descriptor</title>
  +    <title>Type Definition</title>
       <authors>
         <person name="Stephen McConnell" email="[EMAIL PROTECTED]"/>
       </authors>
  @@ -23,7 +23,7 @@
   
         <s2 title="XML Schema">
   
  -<p>Configuration instances supplied to the builder shall correspond to the 
<a href="http://jakarta.apache.org/avalon/dtds/type-1_1.dtd";>type DTD</a>.  
  +<p>Configuration instances supplied to the builder shall correspond to the 
<a href="http://jakarta.apache.org/avalon/dtds/meta/type-1_1.dtd";>type DTD</a>. 
 
   The structure of a Type XML document is is described below:</p>
   
   <source>
  @@ -113,9 +113,9 @@
       &lt;services&gt;
   
         <font color="gray"><i>&lt;!-- 
  -      The service type is the classname of an interface and the
  -      version identifier qualifes the interface version.  The 
  -      default version value is 1.0.
  +      The service element declares the classname of an service 
  +      interface and the version identifier the qualifes the service 
  +      version.  The default version value is 1.0.
         --&gt;</i></font>
   
         &lt;service&gt;
  @@ -125,9 +125,9 @@
           &lt;attributes&gt;
   
              <font color="gray"><i>&lt;!--
  -           Service type attributes go here.
  -
  -           Need some relevant examples. 
  +           Attributes qualifying a service implementation may be included
  +           as supplimentary information to the attributes declared under
  +           a ServiceDefintion.
              --&gt;</i></font>
   
           &lt;/attributes&gt;
  @@ -141,10 +141,9 @@
       Declaration of the set of dependecies that this component type has on 
       component suppliers.  Dependency declarations define the role name 
       that the component will use to access a service via a service
  -    or component manager.  The service element identifies a service 
  -    descriptor that is publised by a potential supplier component. 
  -    A dependecy may be declared as optional by setting the optional 
  -    attribute value to TRUE.  The default value for optional is FALSE.
  +    or component manager.  A dependecy may be declared as optional by 
  +    setting the optional attribute value to TRUE.  The default value 
  +    for optional is FALSE.
       --&gt;</i></font>
   
       &lt;dependencies&gt;
  @@ -177,8 +176,8 @@
           &lt;attributes&gt;
   
              <font color="gray"><i>&lt;!-- 
  -           Service type constraints go here.
  -           Need some relevant examples. 
  +           ServiceDefintion constraints may be included under the 
  +           attributes element.
              --&gt;</i></font>
   
           &lt;/attributes&gt;
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to