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 */ 017package org.apache.wicket.jmx; 018 019import java.io.IOException; 020 021import org.apache.wicket.RuntimeConfigurationType; 022 023 024/** 025 * MBean interface for exposing application related information and functionality. 026 * 027 * @author eelcohillenius 028 */ 029public interface ApplicationMBean 030{ 031 /** 032 * Clears the markup cache, so that templates and properties etc will be reloaded the next time 033 * they are requested. 034 * 035 * @throws IOException 036 */ 037 void clearMarkupCache() throws IOException; 038 039 /** 040 * Gets the class of the application. 041 * 042 * @return the class of the application 043 * @throws IOException 044 */ 045 String getApplicationClass() throws IOException; 046 047 /** 048 * The configuration type, either {@link RuntimeConfigurationType#DEVELOPMENT} or 049 * {@link RuntimeConfigurationType#DEPLOYMENT}. 050 * 051 * @return The configuration type 052 */ 053 String getConfigurationType(); 054 055 /** 056 * Gets the configured home page for this application. 057 * 058 * @return the configured home page for this application 059 * @throws IOException 060 */ 061 String getHomePageClass() throws IOException; 062 063 /** 064 * Gets the number of elements currently in the markup cache. 065 * 066 * @return the number of elements currently in the markup cache 067 * @throws IOException 068 */ 069 int getMarkupCacheSize() throws IOException; 070 071 /** 072 * Gets the Wicket version. The Wicket version is in the same format as the version element in 073 * the pom.xml file (project descriptor). The version is generated by maven in the build/release 074 * cycle and put in the wicket.properties file located in the root folder of the Wicket jar. 075 * 076 * The version usually follows one of the following formats: 077 * <ul> 078 * <li>major.minor[.bug] for stable versions. 1.1, 1.2, 1.2.1 are examples</li> 079 * <li>major.minor-state for development versions. 1.2-beta2, 1.3-SNAPSHOT are examples</li> 080 * </ul> 081 * 082 * @return the Wicket version 083 * @throws IOException 084 */ 085 String getWicketVersion() throws IOException; 086 087 /** 088 * Clears the localizer cache. 089 * 090 * @throws IOException 091 */ 092 void clearLocalizerCache() throws IOException; 093}