01: /*
02: * ==============================================================================
03: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
04: * use this file except in compliance with the License. You may obtain a copy of
05: * the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12: * License for the specific language governing permissions and limitations under
13: * the License.
14: */
15: package wicket.jmx;
16:
17: import java.io.IOException;
18:
19: import wicket.Application;
20:
21: /**
22: * MBean interface for exposing application related information and
23: * functionality.
24: *
25: * @author eelcohillenius
26: */
27: public interface ApplicationMBean {
28: /**
29: * Clears the markup cache, so that templates and properties etc will be
30: * reloaded the next time they are requested.
31: *
32: * @throws IOException
33: */
34: void clearMarkupCache() throws IOException;
35:
36: /**
37: * Gets the class of the application.
38: *
39: * @return the class of the application
40: * @throws IOException
41: */
42: String getApplicationClass() throws IOException;
43:
44: /**
45: * The configuration type, either {@link wicket.Application#DEVELOPMENT} or
46: * {@link Application#DEPLOYMENT}.
47: *
48: * @return The configuration type
49: */
50: String getConfigurationType();
51:
52: /**
53: * Gets the configured home page for this application.
54: *
55: * @return the configured home page for this application
56: * @throws IOException
57: */
58: String getHomePageClass() throws IOException;
59:
60: /**
61: * Gets the number of elements currently in the markup cache.
62: *
63: * @return the number of elements currently in the markup cache
64: * @throws IOException
65: */
66: int getMarkupCacheSize() throws IOException;
67:
68: /**
69: * Lists the registered URL mounts.
70: *
71: * @return the registered URL mounts
72: * @throws IOException
73: */
74: String[] getMounts() throws IOException;
75:
76: /**
77: * Gets the Wicket version. The Wicket version is in the same format as the
78: * version element in the pom.xml file (project descriptor). The version is
79: * generated by maven in the build/release cycle and put in the
80: * wicket.properties file located in the root folder of the Wicket jar.
81: *
82: * The version usually follows one of the following formats:
83: * <ul>
84: * <li>major.minor[.bug] for stable versions. 1.1, 1.2, 1.2.1 are examples</li>
85: * <li>major.minor-state for development versions. 1.2-beta2, 1.3-SNAPSHOT
86: * are examples</li>
87: * </ul>
88: *
89: * @return the Wicket version
90: * @throws IOException
91: */
92: String getWicketVersion() throws IOException;
93: }
|