KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > service > resource > ResourceAdapterCFForm


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  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * 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  * --------------------------------------------------------------------------
22  * $Id: ResourceAdapterCFForm.java,v 1.1 2005/04/26 16:19:06 ehardesty Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.webapp.jonasadmin.service.resource;
27
28 import java.net.URL JavaDoc;
29 import java.util.ArrayList JavaDoc;
30 import java.util.Collections JavaDoc;
31 import java.util.Enumeration JavaDoc;
32 import java.util.Properties JavaDoc;
33
34 import javax.management.ObjectName JavaDoc;
35
36 import javax.servlet.http.HttpServletRequest JavaDoc;
37
38 import org.apache.struts.action.ActionErrors;
39 import org.apache.struts.action.ActionForm;
40 import org.apache.struts.action.ActionMapping;
41 import org.objectweb.jonas.webapp.jonasadmin.Jlists;
42 import org.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx;
43 import org.objectweb.jonas.webapp.jonasadmin.common.LabelValueByLabelComparator;
44 import org.objectweb.jonas.webapp.taglib.LabelValueBean;
45
46
47 /**
48  * @author Michel-Ange ANTON
49  */

50 public class ResourceAdapterCFForm extends ActionForm {
51
52 // --------------------------------------------------------- Properties variables
53

54     private String JavaDoc action = null;
55     private String JavaDoc description = null;
56     private String JavaDoc name = null;
57     private ArrayList JavaDoc listProperties = new ArrayList JavaDoc();
58     private ObjectName JavaDoc oName = null;
59
60     private String JavaDoc jdbcTestStatement = "1";
61     private java.util.List JavaDoc checkingLevels = Jlists.getJdbcConnectionCheckingLevels();
62     private String JavaDoc currentOpened = null;
63     private String JavaDoc currentBusy = null;
64     private String JavaDoc busyMaxRecent = null;
65     private String JavaDoc busyMinRecent = null;
66     private String JavaDoc currentInTx = null;
67     private String JavaDoc openedCount = null;
68     private String JavaDoc connectionFailures = null;
69     private String JavaDoc connectionLeaks = null;
70     private String JavaDoc currentWaiters = null;
71     private String JavaDoc waitersHigh = null;
72     private String JavaDoc waitersHighRecent = null;
73     private String JavaDoc waiterCount = null;
74     private String JavaDoc waitingTime = null;
75     private String JavaDoc waitingHigh = null;
76     private String JavaDoc waitingHighRecent = null;
77     private String JavaDoc servedOpen = null;
78     private String JavaDoc rejectedOpen = null;
79     private String JavaDoc rejectedFull = null;
80     private String JavaDoc rejectedTimeout = null;
81     private String JavaDoc rejectedOther = null;
82     private String JavaDoc jdbcConnCheckLevel = "0";
83     private String JavaDoc connMaxAge = "0";
84     private String JavaDoc maxOpentime = "0";
85     private String JavaDoc maxSize = "0";
86     private String JavaDoc minSize = "0";
87     private String JavaDoc maxWaitTime = "0";
88     private String JavaDoc maxWaiters = "0";
89     private String JavaDoc samplingPeriod = "0";
90
91     private ArrayList JavaDoc listUsedByEjb = new ArrayList JavaDoc();
92
93 // --------------------------------------------------------- Public Methods
94

95     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
96     }
97
98     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
99         ActionErrors oErrors = new ActionErrors();
100         return oErrors;
101     }
102
103 // --------------------------------------------------------- Properties Methods
104

105     public String JavaDoc getAction() {
106         return action;
107     }
108
109     public void setAction(String JavaDoc action) {
110         this.action = action;
111     }
112
113     public String JavaDoc getDescription() {
114         return description;
115     }
116
117     public void setDescription(String JavaDoc desc) {
118         description = desc;
119     }
120
121     public String JavaDoc getName() {
122         return name;
123     }
124
125     public void setName(String JavaDoc name) {
126         this.name = name;
127     }
128
129     public ArrayList JavaDoc getListProperties() {
130         return listProperties;
131     }
132
133     public void setListProperties(Properties JavaDoc properties) {
134         this.listProperties.clear();
135         // Fill list with properties (keys and values)
136
String JavaDoc sKey;
137         Enumeration JavaDoc oEnum = properties.keys();
138         while (oEnum.hasMoreElements()) {
139             sKey = oEnum.nextElement().toString();
140             this.listProperties.add(new LabelValueBean(sKey, properties.getProperty(sKey, "")));
141         }
142         Collections.sort(this.listProperties, new LabelValueByLabelComparator());
143     }
144
145     public void setOName(ObjectName JavaDoc oName) {
146         this.oName = oName;
147     }
148     
149     public ObjectName JavaDoc getOName() {
150         return oName;
151     }
152
153     // Statistics
154
public String JavaDoc getCurrentOpened() {
155         return currentOpened;
156     }
157
158     public void setCurrentOpened(String JavaDoc s) {
159         currentOpened = s;
160     }
161
162     public String JavaDoc getCurrentBusy() {
163         return currentBusy;
164     }
165
166     public void setCurrentBusy(String JavaDoc s) {
167         currentBusy = s;
168     }
169
170     public String JavaDoc getCurrentInTx() {
171         return currentInTx;
172     }
173
174     public void setCurrentInTx(String JavaDoc s) {
175         currentInTx = s;
176     }
177
178     public String JavaDoc getOpenedCount() {
179         return openedCount;
180     }
181
182     public void setOpenedCount(String JavaDoc s) {
183         openedCount = s;
184     }
185
186     public String JavaDoc getConnectionFailures() {
187         return connectionFailures;
188     }
189
190     public void setConnectionFailures(String JavaDoc s) {
191         connectionFailures = s;
192     }
193
194     public String JavaDoc getConnectionLeaks() {
195         return connectionLeaks;
196     }
197
198     public void setConnectionLeaks(String JavaDoc s) {
199         connectionLeaks = s;
200     }
201
202     public String JavaDoc getCurrentWaiters() {
203         return currentWaiters;
204     }
205
206     public void setCurrentWaiters(String JavaDoc s) {
207         currentWaiters = s;
208     }
209
210     public String JavaDoc getWaitersHigh() {
211         return waitersHigh;
212     }
213
214     public void setWaitersHigh(String JavaDoc s) {
215         waitersHigh = s;
216     }
217
218     public String JavaDoc getWaitersHighRecent() {
219         return waitersHighRecent;
220     }
221
222     public void setWaitersHighRecent(String JavaDoc s) {
223         waitersHighRecent = s;
224     }
225
226     public String JavaDoc getBusyMaxRecent() {
227         return busyMaxRecent;
228     }
229
230     public void setBusyMaxRecent(String JavaDoc s) {
231         busyMaxRecent = s;
232     }
233
234     public String JavaDoc getBusyMinRecent() {
235         return busyMinRecent;
236     }
237
238     public void setBusyMinRecent(String JavaDoc s) {
239         busyMinRecent = s;
240     }
241
242     public String JavaDoc getWaiterCount() {
243         return waiterCount;
244     }
245
246     public void setWaiterCount(String JavaDoc s) {
247         waiterCount = s;
248     }
249
250     public String JavaDoc getWaitingTime() {
251         return waitingTime;
252     }
253
254     public void setWaitingTime(String JavaDoc s) {
255         waitingTime = s;
256     }
257
258     public String JavaDoc getWaitingHigh() {
259         return waitingHigh;
260     }
261
262     public void setWaitingHigh(String JavaDoc s) {
263         waitingHigh = s;
264     }
265
266     public String JavaDoc getWaitingHighRecent() {
267         return waitingHighRecent;
268     }
269
270     public void setWaitingHighRecent(String JavaDoc s) {
271         waitingHighRecent = s;
272     }
273
274     public String JavaDoc getServedOpen() {
275         return servedOpen;
276     }
277
278     public void setServedOpen(String JavaDoc s) {
279         servedOpen = s;
280     }
281
282     public String JavaDoc getRejectedOpen() {
283         return rejectedOpen;
284     }
285
286     public void setRejectedOpen(String JavaDoc s) {
287         rejectedOpen = s;
288     }
289
290     public String JavaDoc getRejectedFull() {
291         return rejectedFull;
292     }
293
294     public void setRejectedFull(String JavaDoc s) {
295         rejectedFull = s;
296     }
297
298     public String JavaDoc getRejectedTimeout() {
299         return rejectedTimeout;
300     }
301
302     public void setRejectedTimeout(String JavaDoc s) {
303         rejectedTimeout = s;
304     }
305
306     public String JavaDoc getRejectedOther() {
307         return rejectedOther;
308     }
309
310     public void setRejectedOther(String JavaDoc s) {
311         rejectedOther = s;
312     }
313
314     public String JavaDoc getJdbcConnCheckLevel() {
315         return jdbcConnCheckLevel;
316     }
317
318     public void setJdbcConnCheckLevel(String JavaDoc jdbcConnCheckLevel) {
319         this.jdbcConnCheckLevel = jdbcConnCheckLevel;
320     }
321
322     public String JavaDoc getConnMaxAge() {
323         return connMaxAge;
324     }
325
326     public void setConnMaxAge(String JavaDoc s) {
327         connMaxAge = s;
328     }
329
330     public String JavaDoc getMaxOpentime() {
331         return maxOpentime;
332     }
333
334     public void setMaxOpentime(String JavaDoc s) {
335         maxOpentime = s;
336     }
337
338     public String JavaDoc getMaxSize() {
339         return maxSize;
340     }
341
342     public void setMaxSize(String JavaDoc maxSize) {
343         this.maxSize = maxSize;
344     }
345
346     public String JavaDoc getMinSize() {
347         return minSize;
348     }
349
350     public void setMinSize(String JavaDoc minSize) {
351         this.minSize = minSize;
352     }
353
354     public String JavaDoc getMaxWaitTime() {
355         return maxWaitTime;
356     }
357
358     public void setMaxWaitTime(String JavaDoc maxWaitTime) {
359         this.maxWaitTime = maxWaitTime;
360     }
361
362     public String JavaDoc getMaxWaiters() {
363         return maxWaiters;
364     }
365
366     public void setMaxWaiters(String JavaDoc s) {
367         this.maxWaiters = s;
368     }
369
370     public String JavaDoc getSamplingPeriod() {
371         return samplingPeriod;
372     }
373
374     public void setSamplingPeriod(String JavaDoc s) {
375         this.samplingPeriod = s;
376     }
377
378     public String JavaDoc getJdbcTestStatement() {
379         return jdbcTestStatement;
380     }
381
382     public void setJdbcTestStatement(String JavaDoc jdbcTestStatement) {
383         this.jdbcTestStatement = jdbcTestStatement;
384     }
385
386     public java.util.List JavaDoc getCheckingLevels() {
387         return checkingLevels;
388     }
389
390     public ArrayList JavaDoc getListUsedByEjb() {
391         return listUsedByEjb;
392     }
393
394     public void setListUsedByEjb(ArrayList JavaDoc listUsedByEjb) {
395         this.listUsedByEjb = listUsedByEjb;
396     }
397     
398 }
Popular Tags