KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_rar > deployment > xml > PoolParams


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  *
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or 1any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  *
22  * Initial developer: Florent BENOIT
23  * --------------------------------------------------------------------------
24  * $Id: PoolParams.java,v 1.4 2004/11/02 00:24:43 ehardesty Exp $
25  * --------------------------------------------------------------------------
26  */

27 package org.objectweb.jonas_rar.deployment.xml;
28
29 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
30
31 /**
32  * This class defines the implementation of the element pool-params
33  *
34  * @author Florent Benoit
35  */

36
37 public class PoolParams extends AbsElement {
38
39     /**
40      * pool-init
41      */

42     private String JavaDoc poolInit = null;
43
44     /**
45      * pool-min
46      */

47     private String JavaDoc poolMin = null;
48
49     /**
50      * pool-max
51      */

52     private String JavaDoc poolMax = null;
53
54     /**
55      * pool-max-age
56      */

57     private String JavaDoc poolMaxAge = null;
58
59     /**
60      * pstmt-max
61      */

62     private String JavaDoc pstmtMax = null;
63
64     /**
65      * pool-max-age-minutes
66      */

67     private String JavaDoc poolMaxAgeMinutes = null;
68
69     /**
70      * pool-max-opentime
71      */

72     private String JavaDoc poolMaxOpentime = null;
73
74     /**
75      * pool-max-waiters
76      */

77     private String JavaDoc poolMaxWaiters = null;
78
79     /**
80      * pool-max-waittime
81      */

82     private String JavaDoc poolMaxWaittime = null;
83
84     /**
85      * pool-sampling-period
86      */

87     private String JavaDoc poolSamplingPeriod = null;
88
89
90     /**
91      * Constructor
92      */

93     public PoolParams() {
94         super();
95     }
96
97     /**
98      * Gets the pool-init
99      * @return the pool-init
100      */

101     public String JavaDoc getPoolInit() {
102         return poolInit;
103     }
104
105     /**
106      * Set the pool-init
107      * @param poolInit poolInit
108      */

109     public void setPoolInit(String JavaDoc poolInit) {
110         this.poolInit = poolInit;
111     }
112
113     /**
114      * Gets the pool-min
115      * @return the pool-min
116      */

117     public String JavaDoc getPoolMin() {
118         return poolMin;
119     }
120
121     /**
122      * Set the pool-min
123      * @param poolMin poolMin
124      */

125     public void setPoolMin(String JavaDoc poolMin) {
126         this.poolMin = poolMin;
127     }
128
129     /**
130      * Gets the pool-max
131      * @return the pool-max
132      */

133     public String JavaDoc getPoolMax() {
134         return poolMax;
135     }
136
137     /**
138      * Set the pool-max
139      * @param poolMax poolMax
140      */

141     public void setPoolMax(String JavaDoc poolMax) {
142         this.poolMax = poolMax;
143     }
144
145     /**
146      * Gets the pool-max-age
147      * @return the pool-max-age
148      */

149     public String JavaDoc getPoolMaxAge() {
150         return poolMaxAge;
151     }
152
153     /**
154      * Set the pool-max-age
155      * @param poolMaxAge poolMaxAge
156      */

157     public void setPoolMaxAge(String JavaDoc poolMaxAge) {
158         this.poolMaxAge = poolMaxAge;
159     }
160
161     /**
162      * Gets the pstmt-max
163      * @return the pstmt-max
164      */

165     public String JavaDoc getPstmtMax() {
166         return pstmtMax;
167     }
168
169     /**
170      * Set the pstmt-max
171      * @param pstmtMax pstmtMax
172      */

173     public void setPstmtMax(String JavaDoc pstmtMax) {
174         this.pstmtMax = pstmtMax;
175     }
176
177     /**
178      * Gets the pool-max-age-minutes
179      * @return the pool-max-age-minutes
180      */

181     public String JavaDoc getPoolMaxAgeMinutes() {
182         return poolMaxAgeMinutes;
183     }
184     /**
185      * Set the pool-max-age-minutes
186      * @param val pool-max-age-minutes
187      */

188     public void setPoolMaxAgeMinutes(String JavaDoc val) {
189         poolMaxAgeMinutes = val;
190     }
191
192     /**
193      * Gets the pool-max-opentime
194      * @return the pool-max-opentime
195      */

196     public String JavaDoc getPoolMaxOpentime() {
197         return poolMaxOpentime;
198     }
199     /**
200      * Set the pool-max-opentime
201      * @param val pool-max-opentime
202      */

203     public void setPoolMaxOpentime(String JavaDoc val) {
204         poolMaxOpentime = val;
205     }
206
207     /**
208      * Gets the pool-max-waiters
209      * @return the pool-max-waiters
210      */

211     public String JavaDoc getPoolMaxWaiters() {
212         return poolMaxWaiters;
213     }
214     /**
215      * Set the pool-max-waiters
216      * @param val pool-max-waiters
217      */

218     public void setPoolMaxWaiters(String JavaDoc val) {
219         poolMaxWaiters = val;
220     }
221
222     /**
223      * Gets the pool-max-waittime
224      * @return pool-max-waittime
225      */

226     public String JavaDoc getPoolMaxWaittime() {
227         return poolMaxWaittime;
228     }
229     /**
230      * Set the pool-max-waittime
231      * @param val pool-max-waittime
232      */

233     public void setPoolMaxWaittime(String JavaDoc val) {
234         poolMaxWaittime = val;
235     }
236
237     /**
238      * Gets the pool-sampling-period
239      * @return pool-sampling-period
240      */

241     public String JavaDoc getPoolSamplingPeriod() {
242         return poolSamplingPeriod;
243     }
244     /**
245      * Set the pool-sampling-period
246      * @param val pool-sampling-period
247      */

248     public void setPoolSamplingPeriod(String JavaDoc val) {
249         poolSamplingPeriod = val;
250     }
251
252     /**
253      * Represents this element by it's XML description.
254      * @param indent use this indent for prefixing XML representation.
255      * @return the XML description of this object.
256      */

257     public String JavaDoc toXML(int indent) {
258         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
259         sb.append(indent(indent));
260         sb.append("<pool-params>\n");
261
262         indent += 2;
263
264         // pool-init
265
sb.append(xmlElement(poolInit, "pool-init", indent));
266         // pool-min
267
sb.append(xmlElement(poolMin, "pool-min", indent));
268         // pool-max
269
sb.append(xmlElement(poolMax, "pool-max", indent));
270         if (poolMaxAge != null) {
271             // pool-max-age
272
sb.append(xmlElement(poolMaxAge, "pool-max-age", indent));
273         } else {
274             // pool-max-minutes
275
sb.append(xmlElement(poolMaxAgeMinutes, "pool-max-age-minutes", indent));
276         }
277         // pstmt-max
278
sb.append(xmlElement(pstmtMax, "pstmt-max", indent));
279         // pool-max-opentime
280
sb.append(xmlElement(poolMaxOpentime, "pool-max-opentime", indent));
281         // pool-max-waiters
282
sb.append(xmlElement(poolMaxWaiters, "pool-max-waiters", indent));
283         // pool-max-waittime
284
sb.append(xmlElement(poolMaxWaittime, "pool-max-waittime", indent));
285         // pool-sampling-period
286
sb.append(xmlElement(poolSamplingPeriod, "pool-sampling-period", indent));
287         indent -= 2;
288         sb.append(indent(indent));
289         sb.append("</pool-params>\n");
290
291         return sb.toString();
292     }
293 }
294
Popular Tags