01: /*
02: * This file is part of the QuickServer library
03: * Copyright (C) 2003-2005 QuickServer.org
04: *
05: * Use, modification, copying and distribution of this software is subject to
06: * the terms and conditions of the GNU Lesser General Public License.
07: * You should have received a copy of the GNU LGP License along with this
08: * library; if not, you can download a copy from <http://www.quickserver.org/>.
09: *
10: * For questions, suggestions, bug-reports, enhancement-requests etc.
11: * visit http://www.quickserver.org
12: *
13: */
14:
15: package org.quickserver.util.xmlreader;
16:
17: /**
18: * This class encapsulate the ClientHandler Object pool configuration.
19: * The xml is <client-handler-object-pool>...</client-handler-object-pool>
20: * @author Akshathkumar Shetty
21: */
22: public class ClientHandlerObjectPoolConfig extends PoolConfig {
23:
24: public ClientHandlerObjectPoolConfig() {
25: super ();
26: }
27:
28: public ClientHandlerObjectPoolConfig(PoolConfig poolConfig) {
29: setMaxActive(poolConfig.getMaxActive());
30: setMaxIdle(poolConfig.getMaxIdle());
31: setInitSize(poolConfig.getInitSize());
32: }
33:
34: /**
35: * Returns XML config of this class.
36: */
37: public String toXML(String pad) {
38: if (pad == null)
39: pad = "";
40: StringBuffer sb = new StringBuffer();
41: sb.append(pad + "<client-handler-object-pool>\n");
42: sb.append(pad + "\t<max-active>" + getMaxActive()
43: + "</max-active>\n");
44: sb
45: .append(pad + "\t<max-idle>" + getMaxIdle()
46: + "</max-idle>\n");
47: sb.append(pad + "\t<init-size>" + getInitSize()
48: + "</init-size>\n");
49: sb.append(pad + "</client-handler-object-pool>\n");
50: return sb.toString();
51: }
52: }
|