Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 71653 invoked from network); 9 Nov 2001 19:57:23 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Nov 2001 19:57:23 -0000 Received: (qmail 2613 invoked by uid 97); 9 Nov 2001 19:53:57 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 2565 invoked by uid 97); 9 Nov 2001 19:53:56 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 2526 invoked by uid 97); 9 Nov 2001 19:53:56 -0000 Date: 9 Nov 2001 19:41:46 -0000 Message-ID: <20011109194146.56985.qmail@icarus.apache.org> From: remm@apache.org To: jakarta-tomcat-4.0-cvs@apache.org Subject: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ContainerBase.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 null. @@ -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: For additional commands, e-mail: