1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 * 19 */ 20 package org.apache.mina.integration.jmx; 21 22 /** 23 * @author The Apache Directory Project (mina-dev@directory.apache.org) 24 * @version $Rev: 555855 $, $Date: 2007-07-13 12:19:00 +0900 (금, 13 7월 2007) $ 25 */ 26 public interface IoServiceManagerMBean { 27 /** 28 * amount of session currently managed 29 * @return session count 30 */ 31 int getManagedSessionCount(); 32 33 /** 34 * start collecting throughput statistics for all the managed sessions 35 * @param millisecondsPolling polling time in milliseconds like 5000 for computing throughput every 5 seconds 36 */ 37 void startCollectingStats(int millisecondsPolling); 38 39 /** 40 * stop collecting throughput statistics 41 */ 42 void stopCollectingStats(); 43 44 /** 45 * bytes read per seconds sum of all the managed sessions 46 * @return bytes per seconds 47 */ 48 float getTotalByteReadThroughput(); 49 50 /** 51 * bytes written per seconds sum for all the managed sessions 52 * @return bytes per seconds 53 */ 54 float getTotalByteWrittenThroughput(); 55 56 /** 57 * messages read per seconds sum of all the managed sessions 58 * @return messages per seconds 59 */ 60 float getTotalMessageReadThroughput(); 61 62 /** 63 * messages written per seconds sum for all the managed sessions 64 * @return messages per seconds 65 */ 66 float getTotalMessageWrittenThroughput(); 67 68 /** 69 * average bytes read per seconds for all the managed sessions, be carefull 70 * doesn't make sense for sateless servers 71 * @return bytes per seconds 72 */ 73 float getAverageByteReadThroughput(); 74 75 /** 76 * average bytes written per seconds for all the managed sessions, be carefull 77 * doesn't make sense for sateless servers 78 * @return bytes per seconds 79 */ 80 float getAverageByteWrittenThroughput(); 81 82 /** 83 * average messages read per seconds for all the managed sessions, be carefull 84 * doesn't make sense for sateless servers 85 * @return messages per seconds 86 */ 87 float getAverageMessageReadThroughput(); 88 89 /** 90 * average messages written per seconds for all the managed sessions, be carefull 91 * doesn't make sense for sateless servers 92 * @return messages per seconds 93 */ 94 float getAverageMessageWrittenThroughput(); 95 96 /** 97 * close all the managed sessions 98 */ 99 void closeAllSessions(); 100 101 }