tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ContainerBase.java
Date Fri, 09 Nov 2001 19:41:46 GMT
remm        01/11/09 11:41:46

  Modified:    catalina/src/share/org/apache/catalina/core
                        ContainerBase.java
  Log:
  - Add new findLifecycleListeners and findContainerListeners methods.
  
  Revision  Changes    Path
  1.16      +32 -4     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java
  
  Index: ContainerBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ContainerBase.java	2001/10/26 02:16:23	1.15
  +++ ContainerBase.java	2001/11/09 19:41:45	1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
1.15 2001/10/26 02:16:23 craigmcc Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/10/26 02:16:23 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
1.16 2001/11/09 19:41:45 remm Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/11/09 19:41:45 $
    *
    * ====================================================================
    *
  @@ -154,7 +154,7 @@
    * class comments of the implementation class.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.15 $ $Date: 2001/10/26 02:16:23 $
  + * @version $Revision: 1.16 $ $Date: 2001/11/09 19:41:45 $
    */
   
   public abstract class ContainerBase
  @@ -506,6 +506,7 @@
           return (null);
       }
   
  +
       /**
        * Set the Cluster with which this Container is associated.
        *
  @@ -890,6 +891,22 @@
   
   
       /**
  +     * Return the set of container listeners associated with this Container.
  +     * If this Container has no registered container listeners, a zero-length
  +     * array is returned.
  +     */
  +    public ContainerListener[] findContainerListeners() {
  +
  +        synchronized (listeners) {
  +            ContainerListener[] results = 
  +                new ContainerListener[listeners.size()];
  +            return ((ContainerListener[]) listeners.toArray(results));
  +        }
  +
  +    }
  +
  +
  +    /**
        * Return the Mapper associated with the specified protocol, if there
        * is one.  If there is only one defined Mapper, use it for all protocols.
        * If there is no matching Mapper, return <code>null</code>.
  @@ -1062,6 +1079,17 @@
       public void addLifecycleListener(LifecycleListener listener) {
   
           lifecycle.addLifecycleListener(listener);
  +
  +    }
  +
  +
  +    /**
  +     * Get the lifecycle listeners associated with this lifecycle. If this 
  +     * Lifecycle has no listeners registered, a zero-length array is returned.
  +     */
  +    public LifecycleListener[] findLifecycleListeners() {
  +
  +        return lifecycle.findLifecycleListeners();
   
       }
   
  
  
  

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


Mime
View raw message