001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: JtmServiceStatisticForm.java 4647 2004-04-26 08:03:01Z danesa $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.webapp.jonasadmin.service.jtm;
025:
026: import javax.servlet.http.HttpServletRequest;
027:
028: import org.apache.struts.action.ActionErrors;
029: import org.apache.struts.action.ActionForm;
030: import org.apache.struts.action.ActionMapping;
031:
032: /**
033: * Form used to present the Transaction Manager properties
034: * @author Adriana Danes
035: */
036: public final class JtmServiceStatisticForm extends ActionForm {
037:
038: // ------------------------------------------------------------- Properties Variables
039: private int currentTransactions = 0;
040: private int begunTransactions = 0;
041: private int commitedTransactions = 0;
042: private int rollBackedTransactions = 0;
043: private int expiredTransactions = 0;
044:
045: // ------------------------------------------------------------- Properties Methods
046: public int getCurrentTransactions() {
047: return currentTransactions;
048: }
049:
050: public int getBegunTransactions() {
051: return begunTransactions;
052: }
053:
054: public int getCommitedTransactions() {
055: return commitedTransactions;
056: }
057:
058: public int getRollBackedTransactions() {
059: return rollBackedTransactions;
060: }
061:
062: public int getExpiredTransactions() {
063: return expiredTransactions;
064: }
065:
066: public void setCurrentTransactions(int currentTransactions) {
067: this .currentTransactions = currentTransactions;
068: }
069:
070: public void setBegunTransactions(int begunTransactions) {
071: this .begunTransactions = begunTransactions;
072: }
073:
074: public void setCommitedTransactions(int commitedTransactions) {
075: this .commitedTransactions = commitedTransactions;
076: }
077:
078: public void setRollBackedTransactions(int rollBackedTransactions) {
079: this .rollBackedTransactions = rollBackedTransactions;
080: }
081:
082: public void setExpiredTransactions(int expiredTransactions) {
083: this .expiredTransactions = expiredTransactions;
084: }
085:
086: // ------------------------------------------------------------- Public Methods
087:
088: /**
089: * Reset all properties to their default values.
090: *
091: * @param mapping The mapping used to select this instance
092: * @param request The servlet request we are processing
093: */
094: public void reset(ActionMapping mapping, HttpServletRequest request) {
095: }
096:
097: /**
098: * Validate the properties that have been set from this HTTP request,
099: * and return an <code>ActionErrors</code> object that encapsulates any
100: * validation errors that have been found. If no errors are found, return
101: * <code>null</code> or an <code>ActionErrors</code> object with no
102: * recorded error messages.
103: *
104: * @param mapping The mapping used to select this instance
105: * @param request The servlet request we are processing
106: */
107: public ActionErrors validate(ActionMapping mapping,
108: HttpServletRequest request) {
109: return new ActionErrors();
110: }
111: }
|