tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1240853 - /tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java
Date Sun, 05 Feb 2012 22:52:11 GMT
Author: markt
Date: Sun Feb  5 22:52:11 2012
New Revision: 1240853

URL: http://svn.apache.org/viewvc?rev=1240853&view=rev
Log:
Use interface where possible

Modified:
    tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java?rev=1240853&r1=1240852&r2=1240853&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java Sun Feb  5 22:52:11 2012
@@ -160,8 +160,8 @@ public class ContainerMBean extends Base
         }
 
         try {
-            ContainerBase container = (ContainerBase)getManagedResource();
-            container.addValve(valve);
+            Container container = (Container)getManagedResource();
+            container.getPipeline().addValve(valve);
         } catch (InstanceNotFoundException e) {
             throw new MBeanException(e);
         } catch (RuntimeOperationsException e) {
@@ -185,9 +185,9 @@ public class ContainerMBean extends Base
      * @exception MBeanException if a component cannot be removed
      */
     public void removeValve(String valveName) throws MBeanException{
-        ContainerBase container=null;
+        Container container=null;
         try {
-            container = (ContainerBase)getManagedResource();
+            container = (Container)getManagedResource();
         } catch (InstanceNotFoundException e) {
             throw new MBeanException(e);
         } catch (RuntimeOperationsException e) {
@@ -238,7 +238,7 @@ public class ContainerMBean extends Base
 
         if(listener != null){
             try {
-                ContainerBase container = (ContainerBase)getManagedResource();
+                Container container = (Container)getManagedResource();
                 container.addLifecycleListener(listener);
             } catch (InstanceNotFoundException e) {
                 throw new MBeanException(e);
@@ -257,9 +257,9 @@ public class ContainerMBean extends Base
      * Note that all the listeners having given ClassName will be removed.
      */
     public void removeLifeCycleListeners(String type) throws MBeanException{
-        ContainerBase container=null;
+        Container container=null;
         try {
-            container = (ContainerBase)getManagedResource();
+            container = (Container)getManagedResource();
         } catch (InstanceNotFoundException e) {
             throw new MBeanException(e);
         } catch (RuntimeOperationsException e) {
@@ -282,11 +282,11 @@ public class ContainerMBean extends Base
      * container.
      */
     public String[] findLifecycleListenerNames() throws MBeanException {
-        ContainerBase container = null;
+        Container container = null;
         List<String> result = new ArrayList<String>();
 
         try {
-            container = (ContainerBase) getManagedResource();
+            container = (Container) getManagedResource();
         } catch (InstanceNotFoundException e) {
             throw new MBeanException(e);
         } catch (RuntimeOperationsException e) {
@@ -309,11 +309,11 @@ public class ContainerMBean extends Base
      * container.
      */
     public String[] findContainerListenerNames() throws MBeanException {
-        ContainerBase container = null;
+        Container container = null;
         List<String> result = new ArrayList<String>();
 
         try {
-            container = (ContainerBase) getManagedResource();
+            container = (Container) getManagedResource();
         } catch (InstanceNotFoundException e) {
             throw new MBeanException(e);
         } catch (RuntimeOperationsException e) {



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


Mime
View raw message