avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/container/src/org/apache/excalibur/container/lifecycle AbstractAccessor.java AbstractCreator.java Accessor.java Creator.java package.html
Date Tue, 20 Aug 2002 14:57:27 GMT
mcconnell    2002/08/20 07:57:27

  Added:       container/src/org/apache/excalibur/container/lifecycle
                        AbstractAccessor.java AbstractCreator.java
                        Accessor.java Creator.java package.html
  Log:
  Container independent interfaces and abstract classes supporting the
  lifecycle stage extension model.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/container/src/org/apache/excalibur/container/lifecycle/AbstractAccessor.java
  
  Index: AbstractAccessor.java
  ===================================================================
  /*
  * Copyright (C) The Apache Software Foundation. All rights reserved.
  *
  * This software is published under the terms of the Apache Software License
  * version 1.1, a copy of which has been included with this distribution in
  * the LICENSE.txt file.
  */
  
  package org.apache.excalibur.container.lifecycle;
  
  import org.apache.avalon.framework.context.Context;
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  
  /**
   * Abstract implementation of a <code>Accessor</code>.
   * @author <a href="mailto:mcconnell@osm.net">Stephen McConnell</a>
   */
  public class AbstractAccessor extends AbstractLogEnabled implements Accessor
  {
  
      //=======================================================================
      // Accessor
      //=======================================================================
  
      /**
       * Access stage handler.
       *
       * @param object the object that is being accessed
       * @param context the context instance required by the access handler
       *    implementation
       * @exception Exception if an error occurs
       */
      public void access( Object object, Context context )
          throws Exception
      {
          if( getLogger() == null )
            return;
  
          if( getLogger().isDebugEnabled() )
          {
              getLogger().debug(
                "accessing " + object.getClass().getName() 
                + "#" + System.identityHashCode( object ));
          }
      }
  
      /**
       * Release stage handler.
       *
       * @param object the object that is being released
       * @param context the context instance required by the release handler
       *    implementation
       */
      public void release( Object object, Context context )
      {
          if( getLogger() == null )
            return;
  
          if( getLogger().isDebugEnabled() )
          {
              getLogger().debug(
                "releasing " + object.getClass().getName() 
                + "#" + System.identityHashCode( object ));
          }
      }
  }
  
  
  
  1.1                  jakarta-avalon-excalibur/container/src/org/apache/excalibur/container/lifecycle/AbstractCreator.java
  
  Index: AbstractCreator.java
  ===================================================================
  /*
  * Copyright (C) The Apache Software Foundation. All rights reserved.
  *
  * This software is published under the terms of the Apache Software License
  * version 1.1, a copy of which has been included with this distribution in
  * the LICENSE.txt file.
  */
  
  package org.apache.excalibur.container.lifecycle;
  
  import org.apache.avalon.framework.context.Context;
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  
  /**
   * Abstract implementation of a <code>Creator</code>.
   * @author <a href="mailto:mcconnell@osm.net">Stephen McConnell</a>
   */
  public class AbstractCreator extends AbstractLogEnabled implements Creator
  {
  
      //=======================================================================
      // Creator
      //=======================================================================
  
      /**
       * Create stage handler.
       *
       * @param object the object that is being created
       * @param context the context instance required by the create handler
       *    implementation
       * @exception Exception if an error occurs
       */
      public void create( Object object, Context context )
          throws Exception
      {
          if( getLogger() == null )
            return;
  
          if( getLogger().isDebugEnabled() )
          {
              getLogger().debug(
                "creating " + object.getClass().getName() 
                + "#" + System.identityHashCode( object ));
          }
      }
  
      /**
       * Destroy stage handler.
       *
       * @param object the object that is being destroyed
       * @param context the context instance required by the handler
       *    implementation
       */
      public void destroy( Object object, Context context )
      {
          if( getLogger() == null )
            return;
  
          if( getLogger().isDebugEnabled() )
          {
              getLogger().debug(
                "destroying " + object.getClass().getName() 
                + "#" + System.identityHashCode( object ));
          }
      }
  }
  
  
  
  1.1                  jakarta-avalon-excalibur/container/src/org/apache/excalibur/container/lifecycle/Accessor.java
  
  Index: Accessor.java
  ===================================================================
  /*
  * Copyright (C) The Apache Software Foundation. All rights reserved.
  *
  * This software is published under the terms of the Apache Software License
  * version 1.1, a copy of which has been included with this distribution in
  * the LICENSE.txt file.
  */
  package org.apache.excalibur.container.lifecycle;
  
  import org.apache.avalon.framework.context.Context;
  
  /**
   * The <code>Accessor</code> interface describes the access and release 
   * stages that occur between a service or component manager and a container 
   * during service deployment.  Lifecycle extensions supporting access 
   * and release stages must implement this interface.
   *
   * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
   * @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
   * @version CVS $Revision: 1.1 $ $Date: 2002/08/20 14:57:27 $
   */
  public interface Accessor
  {
      /**
       * Access stage handler.
       *
       * @param object the object that is being accessed
       * @param context the context instance required by the access handler
       *    implementation
       * @exception Exception if an error occurs
       */
      void access( Object object, Context context )
          throws Exception;
  
      /**
       * Release stage handler.
       *
       * @param object the object that is being released
       * @param context the context instance required by the release handler
       *    implementation
       */
      void release( Object object, Context context );
     
  }
  
  
  
  1.1                  jakarta-avalon-excalibur/container/src/org/apache/excalibur/container/lifecycle/Creator.java
  
  Index: Creator.java
  ===================================================================
  /*
  * Copyright (C) The Apache Software Foundation. All rights reserved.
  *
  * This software is published under the terms of the Apache Software License
  * version 1.1, a copy of which has been included with this distribution in
  * the LICENSE.txt file.
  */
  package org.apache.excalibur.container.lifecycle;
  
  import org.apache.avalon.framework.context.Context;
  
  /**
   * The <code>Creator</code> interface describes the create and destroy 
   * stages that occur between a component and a container 
   * during service management.  Lifecycle extensions supporting create
   * and destroy stages must implement this interface.
   *
   * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
   * @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
   * @version CVS $Revision: 1.1 $ $Date: 2002/08/20 14:57:27 $
   */
  public interface Creator
  {
      /**
       * Create stage handler.
       *
       * @param object the object that is being created
       * @param context the context instance required by the create handler
       *    implementation
       * @exception Exception if an error occurs
       */
      void create( Object object, Context context )
          throws Exception;
  
      /**
       * Destroy stage handler.
       *
       * @param object the object that is being destroyed
       * @param context the context instance required by the handler
       *    implementation
       */
      void destroy( Object object, Context context );
     
  }
  
  
  
  1.1                  jakarta-avalon-excalibur/container/src/org/apache/excalibur/container/lifecycle/package.html
  
  Index: package.html
  ===================================================================
  <body>
  Container independent interfaces and classes supporting component lifecycle extension.
  </body>
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message