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: /**
18: * Exposes Application related functionality for JMX.
19: *
20: * @author eelcohillenius
21: */
22: public class SessionSettings implements SessionSettingsMBean {
23: private final wicket.Application application;
24:
25: /**
26: * Create.
27: *
28: * @param application
29: */
30: public SessionSettings(wicket.Application application) {
31: this .application = application;
32: }
33:
34: /**
35: * @see wicket.jmx.SessionSettingsMBean#getMaxPageMaps()
36: */
37: public int getMaxPageMaps() {
38: return application.getSessionSettings().getMaxPageMaps();
39: }
40:
41: /**
42: * @see wicket.jmx.SessionSettingsMBean#getPageFactory()
43: */
44: public String getPageFactory() {
45: return Stringz.className(application.getSessionSettings()
46: .getPageFactory());
47: }
48:
49: /**
50: * @see wicket.jmx.SessionSettingsMBean#getPageMapEvictionStrategy()
51: */
52: public String getPageMapEvictionStrategy() {
53: return Stringz.className(application.getSessionSettings()
54: .getPageMapEvictionStrategy());
55: }
56:
57: /**
58: * @see wicket.jmx.SessionSettingsMBean#getSessionStore()
59: */
60: public String getSessionStore() {
61: return Stringz.className(application.getSessionStore());
62: }
63:
64: /**
65: * @see wicket.jmx.SessionSettingsMBean#setMaxPageMaps(int)
66: */
67: public void setMaxPageMaps(int maxPageMaps) {
68: application.getSessionSettings().setMaxPageMaps(maxPageMaps);
69: }
70:
71: }
|