001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.management.geronimo.stats; 018 019 import javax.management.j2ee.statistics.Stats; 020 import javax.management.j2ee.statistics.RangeStatistic; 021 import javax.management.j2ee.statistics.TimeStatistic; 022 import javax.management.j2ee.statistics.CountStatistic; 023 024 /** 025 * Statistics exposed by a web container (for the container as a whole, not 026 * a particular servlet/JSP/URL). 027 * 028 * todo: confirm the definitions of the Jetty stats included here; verify these are valid for Tomcat as well 029 * 030 * @version $Revision: 1.0$ 031 */ 032 public interface WebContainerStats extends Stats { 033 034 /** 035 * Gets the number of requests being processed concurrently (as well 036 * as the min and max since statistics gathering started). 037 */ 038 RangeStatistic getActiveRequestCount(); 039 040 /** 041 * Gets the the number of requests that have been processed since 042 * statistics gathering started. 043 * Gets the length of time taken to process a request (includes 044 * figures across all requests since statistics gathering started) 045 */ 046 TimeStatistic getRequestDuration(); 047 048 /** 049 * Gets the count of 1xx responses 050 */ 051 CountStatistic getResponses1xx(); 052 053 /** 054 * Gets the count of 2xx responses 055 */ 056 CountStatistic getResponses2xx(); 057 058 /** 059 * Gets the count of 3xx responses 060 */ 061 CountStatistic getResponses3xx(); 062 063 /** 064 * Gets the count of 4xx responses 065 */ 066 CountStatistic getResponses4xx(); 067 068 /** 069 * Gets the count of 5xx responses 070 */ 071 CountStatistic getResponses5xx(); 072 073 /** 074 * Gets the time duration that stats have been active. 075 */ 076 CountStatistic getStatsOnMs(); 077 078 }