mcconnell    2002/08/31 07:52:21

  Modified:    assembly/src/java/org/apache/excalibur/merlin/container
                        Container.java
  Log:
  Reduction of the interface fuctionality concerning disclosure of services (in
  fact - complete elimination of service disclosure).  Objective is to enable container
  implementation to disclose services using a differentr plug-in service access
  strategies dependeing on the functional role of the container in a component
  management system.
  
  Revision  Changes    Path
  1.17      +40 -82    
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/Container.java
  
  Index: Container.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/Container.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Container.java    28 Aug 2002 16:22:50 -0000      1.16
  +++ Container.java    31 Aug 2002 14:52:21 -0000      1.17
  @@ -14,9 +14,9 @@
   
   /**
    * A <code>Container</code> is a manager of a set of components and as such, is 
responsible 
  - * for the establishment, deployment and decommissioning of components.  A 
container is a 
  - * a {@link Controller} and as such can handle startup and shutdown requests.  On 
startup, 
  - * a container is resoponsible for the orderly startup of the components it is 
managing.  On 
  + * for the establishment, deployment and decommissioning of components.  A 
container can handle 
  + * startup, suspension, resumption and shutdown requests.  On startup, 
  + * a container is responsible for the orderly startup of the components it is 
managing.  On 
    * shutdown the container is resposible for orderly service decommissioning.  
    *
    * <p><b>UML</b></p>
  @@ -29,122 +29,80 @@
   {
   
      /**
  -    * Static state enumeration value indicating that the state of a container is 
unknown.
  -    */
  -    static final int UNKNOWN = 0;
  -
  -   /**
  -    * Static state enumeration value indicating that a container has been 
initialized, 
  -    * all of its subsidiary containers have been initialized, and all component 
profiles
  -    * have been assembled.
  -    */
  -    static final int INITIALIZED = 1;
  -
  -   /**
  -    * Static state enumeration value indicating that a container has completed
  -    * lifecycle processing on all components requesting startup establishment.
  -    */
  -    static final int STARTED = 2;
  -
  -   /**
  -    * Static state enumeration value indicating that a container has been suspended.
  -    */
  -    static final int SUSPENDED = 3;
  -
  -   /**
  -    * Static state enumeration value indicating that a container has completed
  -    * the shutdown of all subsidiary containers and the internal components 
  -    * have been shutdown.
  -    */
  -    static final int STOPPED = 4;
  -
  -   /**
  -    * Static state enumeration value indicating that a container and all
  -    * subsidiary containers have been disposed of.
  -    */
  -    static final int DISPOSED = 5;
  -
  -   /**
       * Context key used to locate the container manager.
  +    * @see org.apache.excalibur.merlin.assembly.ContainerManager
       */
       static final String MANAGER_KEY = "merlin:container.manager";
   
      /**
       * Context key used to locate the container descriptor.
  +    * @see org.apache.excalibur.merlin.model.ContainerDescriptor
       */
       static final String DESCRIPTOR_KEY = "merlin:container.descriptor";
   
      /**
  -    * Context key used to locate a state listener.
  +    * Context key used to locate the logging manager.
  +    * @see org.apache.excalibur.merlin.assembly.DefaultLoggerManager
       */
  -    static final String STATE_LISTENER_KEY = "merlin:container.state-listener";
  +    static final String LOGGING_KEY = "merlin:container.logging";
   
      /**
  -    * Context key used to locate a content listener.
  +    * Context key used to locate the container services map associating 
  +    * container descriptors as keys against container resources
  +    * @see java.util.Map
  +    * @see org.apache.excalibur.merlin.model.ContainerDescriptor
  +    * @see org.apache.excalibur.merlin.container.ContainerResource
       */
  -    static final String CONTAINER_LISTENER_KEY = 
"merlin:container.container-listener";
  +    static final String SERVICES_KEY = "merlin:container.services";
   
      /**
  -    * Context key used to locate the logging manager.
  +    * Adds a <code>StateListener</code> to the container.
  +    * @param listener the state listener to add 
       */
  -    static final String LOGGING_KEY = "merlin:container.logging";
  +    void addStateListener( StateListener listener );
   
      /**
  -    * Context key used to locate the container services map for subsidiary 
containers.
  +    * Removes a <code>StateListener</code> from the container.
  +    * @param listener the state listener to remove 
       */
  -    static final String SERVICES_KEY = "merlin:container.services";
  +    void removeStateListener( StateListener listener );
   
      /**
  -    * Return the current state of the container.
  -    *
  -    * @return the container state
  +    * Request for the container to startup all subsidiary containers 
  +    * and all contained components.
       */
  -    int getState();
  +    void start() throws Exception;
   
      /**
  -    * Returns the set of subsidiary continers contained within this container.
  -    *
  -    * @return the containers
  +    * Request for the container to stop all subsidiary containers 
  +    * and all contained components.
       */
  -    //Container[] getContainers();
  +    void stop() throws Exception;
   
      /**
  -    * Post-assembly function that returns the set of resources 
  -    * available from the container.
  -    *
  -    * @return the set of available resources
  +    * Request for the container to suspend all subsidiary containers 
  +    * and all contained components.
       */
  -    Resource[] getResources();
  +    void suspend();
   
      /**
  -    * Add and assemble the supplied set of profiles.
  -    * @param profiles the profiles to assemble
  -    * @exception Exception is an install error occurs
  +    * Request for the container to resume all subsidiary containers 
  +    * and all contained components.
       */
  -    void install( Profile[] profiles ) 
  -      throws Exception;
  +    void resume();
   
      /**
  -    * Creation of a new empty container associated as a subsidiary of this container
  -    * using the same container profile as this container and an empty classpath.
  -    *
  -    * @param name the name to assign to the new container
  -    * @return the new child container
  -    * @exception Exception is an error occurs
  +    * Request disposal of this container, all subsidiary containers and 
  +    * container components.
       */
  -    Container addContainer( String name ) 
  -      throws Exception;
  +    void dispose();
   
      /**
  -    * Creation of a new empty container associated as a subsidiary of this container
  -    * using the same container profile as this container.
  -    *
  -    * @param name the name to assign to the new container
  -    * @param classpath the container classpath
  -    * @return the new child container
  -    * @exception Exception is an error occurs
  +    * Add and assemble the supplied set of profiles.
  +    * @param profiles the profiles to assemble
  +    * @exception Exception is an install error occurs
       */
  -    Container addContainer( String name, ClasspathDescriptor classpath ) 
  +    void install( Profile[] profiles ) 
         throws Exception;
   
   }
  
  
  

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

Reply via email to