mcconnell    2003/01/08 10:33:22

  Modified:    assembly/src/java/org/apache/avalon/assembly/appliance
                        Appliance.java
               assembly/src/java/org/apache/avalon/assembly/engine
                        DefaultRepositoryManager.java
               assembly/src/xdocs appliance.xml engine.xml index.xml
  Log:
  Retract type/service load warnings in favour of an explicit exception.
  
  Revision  Changes    Path
  1.18      +3 -3      
avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/Appliance.java
  
  Index: Appliance.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/Appliance.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Appliance.java    7 Jan 2003 04:24:50 -0000       1.17
  +++ Appliance.java    8 Jan 2003 18:33:20 -0000       1.18
  @@ -67,8 +67,8 @@
   /**
    * An appliance is a class that encapsulates the deployment criteria
    * for a particular component together with a the state supporting 
  - * component assembly and dependency solutions.  The function of an appliace
  - * is to server as the aggregation point for the deployment of a component
  + * component assembly and dependency solutions.  The function of an appliance
  + * is to serve as the aggregation point for the deployment of a component
    * and the access point for services provided by the component implemetation.
    *
    * @author <a href="mailto:avalon-dev@jakarta.apache.org";>Avalon Development 
Team</a>
  
  
  
  1.6       +13 -10    
avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultRepositoryManager.java
  
  Index: DefaultRepositoryManager.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultRepositoryManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultRepositoryManager.java     27 Dec 2002 16:19:14 -0000      1.5
  +++ DefaultRepositoryManager.java     8 Jan 2003 18:33:22 -0000       1.6
  @@ -310,9 +310,10 @@
                   }
                   catch( Throwable e )
                   {
  -                    final String warning = 
  -                      "Ignoring type: " + name;
  -                    getLogger().warn( warning, e );
  +                    final String error = 
  +                      "Could not create type from classname: " + classname 
  +                      + " in the jar: " + base.getName();
  +                    throw new EngineRuntimeException( error, e );
                   }
               }
               else if( name.endsWith( X_INFO ) )
  @@ -326,9 +327,10 @@
                   }
                   catch( Throwable e )
                   {
  -                    final String warning = 
  -                      "Ignoring type: " + name;
  -                    getLogger().warn( warning, e );
  +                    final String error = 
  +                      "Could not create type from classname: " + classname 
  +                      + " in the jar: " + base.getName();
  +                    throw new EngineRuntimeException( error, e );
                   }
               }
   
  @@ -342,9 +344,10 @@
                   }
                   catch( Throwable e )
                   {
  -                    final String warning = 
  -                      "Ignoring type: " + name;
  -                    getLogger().warn( warning, e );
  +                    final String error = 
  +                      "Could not create service from classname: " + 
classname 
  +                      + " in the jar: " + base.getName();
  +                    throw new EngineRuntimeException( error, e );
                   }
               }
           }
  
  
  
  1.2       +116 -32   avalon-sandbox/assembly/src/xdocs/appliance.xml
  
  Index: appliance.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/xdocs/appliance.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- appliance.xml     1 Dec 2002 06:43:22 -0000       1.1
  +++ appliance.xml     8 Jan 2003 18:33:22 -0000       1.2
  @@ -11,7 +11,7 @@
   
       <s1 title="Appliance">
   <p>
  -An <code>Appliance</code> is an object that represents a component.  It 
collects together all of the information and services needed to fully deploy 
the component within a container.  Containers that use the appliance 
abstraction can seperate themselves from the actual component type or model - 
focussing instead on the criteria for deployment.  Secondly, an appliance 
enables deferred activation - i.e. deployment of an actual component when and 
if it is actually required.
  +An <code>Appliance</code> is an object that manages a component.  It 
collects together all of the information and services needed to fully deploy 
the component.  Applications that use the appliance abstraction can seperate 
themselves from the actual component type or model - focussing instead on the 
criteria for deployment. The default appliance implementation completely 
automates the component assembly, lifecycle, lifestyle management. It also 
enables deferred activation - i.e. deployment of an actual component when and 
if it is required.
   </p>
       <s2 title="Appliance Interface">
   <source>
  @@ -29,20 +29,39 @@
   
   public interface Appliance
   {
  -    /**
  -     * Return the profile backing the appliance.
  -     * @return the profile that this appliance is managing
  -     */
  -    Profile getProfile();
  +
  +   /**
  +    * Meta-info attribute name under which an alternative appliance class 
may be declared.
  +    */
  +    static final String APPLIANCE_CLASS_ATTRIBUTE_NAME = 
  +      "urn:assembly:appliance.class";
  +
  +   /**
  +    * Get the appliance name.
  +    */
  +    String getName();
  +
  +   /**
  +    * Get the appliance partition name.
  +    */
  +    String getPartitionName();
  +
  +   /**
  +    * Get the appliance path.
  +    */
  +    String getPath();
  +
  +   /**
  +    * Get the appliance URL.
  +    * @return the appliance URL
  +    */
  +    URL getURL();
   
       /**
  -     * Set the activation policy for the component.  If TRUE, activation
  -     * will occur at startup.  If false, activation will be deferred to
  -     * the first lookup invocation if any (i.e. lazy activation).
  -     *
  -     * @param policy TRUE if the appliace is to be activated on startup
  +     * Return the component type backing the appliance.
  +     * @return the type that the appliance is managing
        */
  -    void setActivationPolicy( boolean policy );
  +    Type getType();
   
       /**
        * Return the activation policy for the component.  If TRUE, activation
  @@ -54,33 +73,61 @@
       boolean getActivationPolicy();
   
       /**
  -     * Test is this profile is enabled.  A profile is enabled unless 
explicitly disabled by an
  +     * Test is this appliance is enabled.  A appliance is enabled unless 
explicitly disabled by an
        * assembly directive, or implicity disabled as a result of an assembly 
failure.
        *
  -     * @return TRUE if the profile is enabled.
  +     * @return TRUE if the appliance is enabled.
        * @see #setEnabled( boolean )
        */
       boolean isEnabled();
   
       /**
  -     * Set the enabled status of the profile to the supplied value.
  +     * Set the enabled status of the appliance to the supplied value.
        * @param value the enabled status - TRUE or FALSE
        */
       void setEnabled( boolean value );
   
       /**
  -     * Return the assigned service providers.
  -     * @return the set of service provider appliances.
  +     * Return the logging categories for the appliance.
  +     *
  +     * @return the logger
        */
  -    Appliance[] getServiceProviders();
  +    LoggingDirective getLoggingDirective();
   
       /**
  -     * Return the dependency associations for component type with specified 
role.
  +     * Return the Parameters to be applied to the appliance.
        *
  -     * @param role the dependency role name
  -     * @return the dependency metadata for component with specified role.
  +     * @return the Parameters for appliance.
        */
  -    Appliance getServiceProvider( final String role );
  +    Parameters getParameters();
  +
  +    /**
  +     * Return the Configuration for the appliance.
  +     *
  +     * @return the Configuration for the appliance.
  +     */
  +    Configuration getConfiguration();
  +
  +   /**
  +    * Get the component context.
  +    *
  +    * @return the component context
  +    */
  +    Context getContext();
  +
  +    /**
  +     * Set the context provider.
  +     *
  +     * @param applaince the appliance to be mapped as provider of the context
  +     */
  +    void setContextProvider( Appliance appliance );
  +
  +    /**
  +     * Return the context provider.
  +     *
  +     * @return the appliance mapped as provider of the context
  +     */
  +    Appliance getContextProvider();
   
       /**
        * Add the appliance that will acts as provider for a named dependency.
  @@ -90,18 +137,18 @@
       void addServiceProvider( String role, Appliance appliance );
   
       /**
  -     * Return the assigned extension providers.
  +     * Return the dependency associations for component type with specified 
role.
        *
  -     * @return the set of extension provider appliances.
  +     * @param role the dependency role name
  +     * @return the appliance mapped as a provider of the role
        */
  -    Appliance[] getExtensionProviders();
  +    Appliance getServiceProvider( final String role );
   
       /**
  -     * Returns the appliace assigned to handle the components lifecycle 
stage.
  -     * @param stage the lifecycle stage specification
  -     * @return a reference to the stage extension
  +     * Return the assigned service providers.
  +     * @return the set of service provider appliances.
        */
  -    Appliance getExtensionProvider( StageDescriptor stage );
  +    Appliance[] getServiceProviders();
   
       /**
        * Add a lifecycle stage extension.
  @@ -110,9 +157,42 @@
        */
       void addExtensionProvider( StageDescriptor stage, Appliance appliance );
   
  +    /**
  +     * Returns the appliace assigned to handle the components lifecycle 
stage.
  +     * @param stage the lifecycle stage specification
  +     * @return a reference to the stage extension
  +     */
  +    Appliance getExtensionProvider( StageDescriptor stage );
  +
  +    /**
  +     * Return the assigned extension providers.
  +     *
  +     * @return the set of extension provider appliances.
  +     */
  +    Appliance[] getExtensionProviders();
  +
  +   /**
  +    * Assemble the appliance.
  +    * @exception AssemblyException if an error occurs during appliance 
assembly
  +    */
  +    void assemble() throws AssemblyException;
  +
  +   /**
  +    * Disassemble the appliance.
  +    */
  +    void disassemble();
  +
  +   /**
  +    * Creation of a instance of the component type managed by the appliance
  +    * in accordance with the lifestyle policy declared by the component type.
  +    *
  +    * @return the implementation object
  +    */
  +    Object access() throws LifestyleException;
  +
      /**
       * Activate a service provided by the appliance.
  -    * @param appliance the appliance to deploy
  +    * @param dependency the service dependecy decsriptor
       */
       Object access( DependencyDescriptor dependency ) throws 
LifestyleException;
   
  @@ -127,6 +207,10 @@
       */
       void release( Object object );
   
  +   /**
  +    * Terminate the appliance.
  +    */
  +    void terminate();
   }
   
   </source>
  
  
  
  1.2       +2 -2      avalon-sandbox/assembly/src/xdocs/engine.xml
  
  Index: engine.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/xdocs/engine.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- engine.xml        1 Dec 2002 06:43:22 -0000       1.1
  +++ engine.xml        8 Jan 2003 18:33:22 -0000       1.2
  @@ -11,7 +11,7 @@
   
       <s1 title="The Engine">
   <p>
  -The <code>engine</code> package includes interfaces and classes on which a 
unit of containment can be manager.   An engine aggregates a type, profile and 
appliance manager and provides support for the creation, registration and 
retrival of appliance instances.
  +The <code>engine</code> package includes interfaces and classes that support 
component deployment.   An engine aggregates a type, profile and appliance 
manager and provides support for the creation, registration and retrival of 
appliance instances.
   </p>
       <s2 title="Java Example">
   
  
  
  
  1.2       +2 -2      avalon-sandbox/assembly/src/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/xdocs/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml 1 Dec 2002 06:43:22 -0000       1.1
  +++ index.xml 8 Jan 2003 18:33:22 -0000       1.2
  @@ -14,7 +14,7 @@
       <s1 title="Assembly - Functional Description">
   
   <p>
  -The Avalon Assembly project is a API dealing with container-side resources.  
I includes facilities supporting the management of component types, services, 
deployment profiles, and a component activation unit referred to as an 
appliance.
  +The Avalon Assembly project is a API dealing with container-side resources.  
It includes facilities supporting the management of component types, services, 
deployment profiles, and a component activation unit referred to as an 
appliance.
   </p>
   
   <p>
  
  
  

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

Reply via email to