01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: * --------------------------------------------------------------------------
21: * $Id: WorkManagerMBean.java 7137 2005-07-28 12:00:42Z durieuxp $
22: * --------------------------------------------------------------------------
23: */package org.objectweb.jonas.server;
24:
25: // Java imports
26:
27: import org.objectweb.jonas_lib.JWorkManager;
28:
29: /**
30: */
31: public class WorkManagerMBean {
32:
33: private JWorkManager wm;
34:
35: /**
36: * Construct MBean
37: */
38: public WorkManagerMBean(JWorkManager wm) {
39: this .wm = wm;
40: }
41:
42: /**
43: * @return current pool size
44: */
45: public int getCurrentPoolSize() {
46: return wm.getCurrentPoolSize();
47: }
48:
49: /**
50: * @return min pool size
51: */
52: public int getMinPoolSize() {
53: return wm.getMinPoolSize();
54: }
55:
56: /**
57: * @return max pool size
58: */
59: public int getMaxPoolSize() {
60: return wm.getMaxPoolSize();
61: }
62:
63: /**
64: * @param minsz min pool size
65: */
66: public void setMinPoolSize(int minsz) {
67: wm.setMinPoolSize(minsz);
68: }
69:
70: /**
71: * @param maxsz max pool size
72: */
73: public void setMaxPoolSize(int maxsz) {
74: wm.setMaxPoolSize(maxsz);
75: }
76: }
|