From: Eric P. <th...@us...> - 2009-12-18 23:28:40
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/structs In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv10477 Added Files: ProcessingStatusStruct.java Log Message: A status message for updates on long running processes. --- NEW FILE: ProcessingStatusStruct.java --- /* * SAND development/deployment environment * Copyright (C) 2008 SAND Services Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.sandev.basics.structs; /** * A status update on the progress of a long running operation. There is * no query form of this message since the matching required for reporting * purposes on the listening side is minimal (normally just checking the * name/identifier). * * @sand.structmessage transmit * @sand.summaryfields name identifier percentComplete status note * @sand.help * A status update on the progress of a long running operation. */ public class ProcessingStatusStruct { /** * A name identifying what kind of status is being sent. There * are no semantics associated with the name, it just provides * additional identifying information that may be useful. * * @sand.invalid "INVALID_NAME" * @sand.stringlength 30 80 * @sand.help * A name identifying what kind of status is being sent. */ protected String name; /** * An identifier of the job being reported on. Typically this is * the thread jobId. * * @sand.range >= 0 * @sand.help * The identifier of the job being reported on. */ protected long identifier; /** * The percentage complete for the job. This is typically a * number between 0 and 100, a negative value represents an * unknown percentage and is used for reporting status on a * job of indeterminate length. A job will typically return * an indeterminte status while it figures out how much work * it needs to do, then return percentages as progress is made * after that. * * @sand.range <= 100 * @sand.printname "percent complete" * @sand.help * The percentage complete for the job. This is typically a * number between 0 and 100, a negative value represents an * unknown percentage and is used for reporting status on a * job of indeterminate length. A job will typically return * an indeterminte status while it figures out how much work * it needs to do, then return percentages as progress is made * after that. */ protected int percentComplete; /** * A status note from the ongoing processing. It is recommended * that this text be in a translatable template form. * * @sand.invalid "INVALID_STATUSMESSAGE" * @sand.stringlength 60 512 * @sand.help * A status message from the ongoing processing. */ protected String note; /** * The current status of the job. * * @sand.enumint UNKNOWN 0 "Unknown" * @sand.enumint PROCESSING 1 "Processing" * @sand.enumint COMPLETE 2 "Complete" * @sand.enumint CANCELLED 3 "Cancelled" * @sand.enumint ERROR 4 "Error" * * @sand.invalid -1 * @sand.default UNKNOWN * @sand.help * The current status of the job. */ protected int status; } |