Source Code Cross Referenced for JobKOctetsProcessed.java in  » 6.0-JDK-Core » print » javax » print » attribute » standard » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » print » javax.print.attribute.standard 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2000-2004 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025        package javax.print.attribute.standard;
026
027        import javax.print.attribute.Attribute;
028        import javax.print.attribute.IntegerSyntax;
029        import javax.print.attribute.PrintJobAttribute;
030
031        /**
032         * Class JobKOctetsProcessed is an integer valued printing attribute class that 
033         * specifies the total number of print data octets processed so far in K octets, 
034         * i.e., in units of 1024 octets. The value must be rounded up, so that a job 
035         * between 1 and 1024 octets inclusive must be indicated as being 1K octets, 
036         * 1025 to 2048 inclusive must be 2K, etc. For a multidoc print job (a job with 
037         * multiple documents), the JobKOctetsProcessed value is computed by adding up 
038         * the individual documents' number of octets processed so far, then rounding up 
039         * to the next K octets value. 
040         * <P>
041         * The JobKOctetsProcessed attribute describes the progress of the job. This 
042         * attribute is intended to be a counter. That is, the JobKOctetsProcessed value 
043         * for a job that has not started processing must be 0. When the job's {@link 
044         * JobState JobState} is PROCESSING or PROCESSING_STOPPED, the 
045         * JobKOctetsProcessed value is intended to increase as the job is processed; it 
046         * indicates the amount of the job that has been processed at the time the Print 
047         * Job's attribute set is queried or at the time a print job event is reported. 
048         * When the job enters the COMPLETED, CANCELED, or ABORTED states, the 
049         * JobKOctetsProcessed value is the final value for the job. 
050         * <P>
051         * For implementations where multiple copies are produced by the interpreter 
052         * with only a single pass over the data, the final value of the 
053         * JobKOctetsProcessed attribute must be equal to the value of the {@link 
054         * JobKOctets JobKOctets} attribute. For implementations where multiple copies 
055         * are produced by the interpreter by processing the data for each copy, the 
056         * final value must be a multiple of the value of the {@link JobKOctets 
057         * JobKOctets} attribute. 
058         * <P>
059         * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The 
060         * category name returned by <CODE>getName()</CODE> gives the IPP attribute 
061         * name. 
062         * <P>
063         *
064         * @see JobKOctets
065         * @see JobKOctetsSupported
066         * @see JobImpressionsCompleted
067         * @see JobMediaSheetsCompleted
068         *
069         * @author  Alan Kaminsky
070         */
071        public final class JobKOctetsProcessed extends IntegerSyntax implements 
072                PrintJobAttribute {
073
074            private static final long serialVersionUID = -6265238509657881806L;
075
076            /**
077             * Construct a new job K octets processed attribute with the given integer 
078             * value. 
079             *
080             * @param  value  Integer value.
081             *
082             * @exception  IllegalArgumentException
083             *  (Unchecked exception) Thrown if <CODE>value</CODE> is less than 0.
084             */
085            public JobKOctetsProcessed(int value) {
086                super (value, 0, Integer.MAX_VALUE);
087            }
088
089            /**
090             * Returns whether this job K octets processed attribute is equivalent to 
091             * the passed in object. To be equivalent, all of the following conditions 
092             * must be true: 
093             * <OL TYPE=1>
094             * <LI>
095             * <CODE>object</CODE> is not null.
096             * <LI>
097             * <CODE>object</CODE> is an instance of class JobKOctetsProcessed.
098             * <LI>
099             * This job K octets processed attribute's value and 
100             * <CODE>object</CODE>'s value are equal. 
101             * </OL>
102             *
103             * @param  object  Object to compare to.
104             *
105             * @return  True if <CODE>object</CODE> is equivalent to this job K
106             *          octets processed attribute, false otherwise. 
107             */
108            public boolean equals(Object object) {
109                return (super .equals(object) && object instanceof  JobKOctetsProcessed);
110            }
111
112            /**
113             * Get the printing attribute class which is to be used as the "category" 
114             * for this printing attribute value.
115             * <P>
116             * For class JobKOctetsProcessed, the category is class 
117             * JobKOctetsProcessed itself. 
118             *
119             * @return  Printing attribute class (category), an instance of class
120             *          {@link java.lang.Class java.lang.Class}.
121             */
122            public final Class<? extends Attribute> getCategory() {
123                return JobKOctetsProcessed.class;
124            }
125
126            /**
127             * Get the name of the category of which this attribute value is an 
128             * instance. 
129             * <P>
130             * For class JobKOctetsProcessed, the category name is 
131             * <CODE>"job-k-octets-processed"</CODE>. 
132             *
133             * @return  Attribute category name.
134             */
135            public final String getName() {
136                return "job-k-octets-processed";
137            }
138
139        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.