Author: kfujino Date: Wed Apr 19 08:09:43 2017 New Revision: 1791871 URL: http://svn.apache.org/viewvc?rev=1791871&view=rev Log: Add MBean for ThroughputInterceptor.
Added: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java (with props) Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=1791871&r1=1791870&r2=1791871&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java (original) +++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java Wed Apr 19 08:09:43 2017 @@ -38,7 +38,9 @@ import org.apache.juli.logging.LogFactor * * @version 1.0 */ -public class ThroughputInterceptor extends ChannelInterceptorBase { +public class ThroughputInterceptor extends ChannelInterceptorBase + implements ThroughputInterceptorMBean { + private static final Log log = LogFactory.getLog(ThroughputInterceptor.class); protected static final StringManager sm = StringManager.getManager(ThroughputInterceptor.class); Added: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java?rev=1791871&view=auto ============================================================================== --- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java (added) +++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java Wed Apr 19 08:09:43 2017 @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina.tribes.group.interceptors; + +import java.util.concurrent.atomic.AtomicLong; + +public interface ThroughputInterceptorMBean { + + public int getOptionFlag(); + + // Attributes + public void setInterval(int interval); + + // stats + public double getLastCnt(); + + public double getMbAppTx(); + + public double getMbRx(); + + public double getMbTx(); + + public AtomicLong getMsgRxCnt(); + + public AtomicLong getMsgTxCnt(); + + public AtomicLong getMsgTxErr(); + + public long getRxStart(); + + public double getTimeTx(); + + public long getTxStart(); + + // Operations + public void report(double timeTx); + +} Propchange: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1791871&r1=1791870&r2=1791871&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Apr 19 08:09:43 2017 @@ -82,6 +82,11 @@ Add <code>maxIdleTime</code> attribute to <code>NioReceiverMBean</code> in order to expose to JMX. (kfujino) </add> + <add> + Add JMX support for <code>Channel Interceptors</code>.ãThe Interceptors + that implement jmx support are <code>TcpFailureDetector</code> + and <code>ThroughputInterceptor</code>. (kfujino) + </add> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org