com.ibm.as400.access
Class ISeriesPrinter

java.lang.Object
  extended by com.ibm.as400.access.ISeriesPrinter
All Implemented Interfaces:
Serializable

public class ISeriesPrinter
extends Object
implements Serializable

Represents a printer attached to an IBM i system. This class provides access to the specified printer's attributes via the QGYRPRTA system API.

This class uses the remote command host server to obtain printer information. Use the Printer class to retrieve similer information using the network print host server.

Example:

     AS400 system = new AS400("mySystem", "myUserID", "myPassword");
     ISeriesPrinter printer = new ISeriesPrinter(system, "myPrinter");
     String type = printer.getPrinterDeviceType();
     if (type == ISeriesPrinter.PRINTER_DEVICE_TYPE_SCS)
     {
         System.out.println(printer.getCopiesLeft());
     }
 

See Also:
Printer, Serialized Form

Field Summary
Modifier and Type Field and Description
static int DEVICE_STATUS_ACTIVE
          Device status constant indicating the device is in the active status.
static int DEVICE_STATUS_ACTIVE_READER
          Device status constant indicating the device is in the active reader status.
static int DEVICE_STATUS_ACTIVE_WRITER
          Device status constant indicating the device is in the active writer status.
static int DEVICE_STATUS_AS36_DISABLED
          Device status constant indicating the device is in the AS/36 disabled status.
static int DEVICE_STATUS_AS36_ENABLED
          Device status constant indicating the device is in the AS/36 enabled status.
static int DEVICE_STATUS_CONNECT_PENDING
          Device status constant indicating the device is in the connect pending status.
static int DEVICE_STATUS_DAMAGED
          Device status constant indicating the device is in the damaged status.
static int DEVICE_STATUS_DIAGNOSTIC_MODE
          Device status constant indicating the device is in the diagnostic mode status.
static int DEVICE_STATUS_FAILED
          Device status constant indicating the device is in the failed status.
static int DEVICE_STATUS_FAILED_READER
          Device status constant indicating the device is in the failed reader status.
static int DEVICE_STATUS_FAILED_WRITER
          Device status constant indicating the device is in the failed writer status.
static int DEVICE_STATUS_HELD
          Device status constant indicating the device is in the held status.
static int DEVICE_STATUS_LOCKED
          Device status constant indicating the device is in the locked status.
static int DEVICE_STATUS_POWERED_OFF
          Device status constant indicating the device is in the powered off status.
static int DEVICE_STATUS_RCYCNL
          Device status constant indicating the device is in the RCYCNL status.
static int DEVICE_STATUS_RCYPND
          Device status constant indicating the device is in the RCYPND status.
static int DEVICE_STATUS_SIGNON_DISPLAY
          Device status constant indicating the device is in the signon display status.
static int DEVICE_STATUS_SYSTEM_REQUEST
          Device status constant indicating the device is in the system request status.
static int DEVICE_STATUS_UNKNOWN
          Device status constant indicating the device is in the unknown status.
static int DEVICE_STATUS_VARIED_OFF
          Device status constant indicating the device is in the varied off status.
static int DEVICE_STATUS_VARIED_ON
          Device status constant indicating the device is in the varied on status.
static int DEVICE_STATUS_VARY_OFF_PENDING
          Device status constant indicating the device is in the vary off pending status.
static int DEVICE_STATUS_VARY_ON_PENDING
          Device status constant indicating the device is in the vary on pending status.
static String FORM_ALIGNMENT_FILE
          Form alignment constant indicating that control of the page alignment is specified by each file.
static String FORM_ALIGNMENT_WRITER
          Form alignment constant indicating that the writer determines when the message is sent.
static String FORM_TYPE_ALL
          Form type constant indicating that the writer is started with the option to print all spooled files of any form type.
static String FORM_TYPE_FORMS
          Form type constant indicating that the writer is started with the option to print all the spooled files with the same form type before using a different form type.
static String FORM_TYPE_STANDARD
          Form type constant indicating that the writer is started with the option to print all the spooled files with a form type of *STD.
static String MESSAGE_OPTION_INFO
          Message option constant indicating that an informational message is sent to the message queue.
static String MESSAGE_OPTION_INQUIRY
          Message option constant indicating that an inquiry message is sent to the message queue.
static String MESSAGE_OPTION_NONE
          Message option constant indicating that no message is sent to the message queue.
static String MESSAGE_OPTION_STANDARD
          Message option constant indicating that a message is sent to the message queue.
static int OUTPUT_QUEUE_STATUS_HELD
          Output queue status constant indicating that the output queue is held.
static int OUTPUT_QUEUE_STATUS_RELEASED
          Output queue status constant indicating that the output queue is released.
static int OVERALL_STATUS_BEING_SERVICED
          Overall status constant indicating that overall status of the logical printer is being serviced.
static int OVERALL_STATUS_CONNECT_PENDING
          Overall status constant indicating that overall status of the logical printer is connect pending.
static int OVERALL_STATUS_HELD
          Overall status constant indicating that overall status of the logical printer is held.
static int OVERALL_STATUS_HOLD_PENDING
          Overall status constant indicating that overall status of the logical printer is hold (pending).
static int OVERALL_STATUS_MESSAGE_WAITING
          Overall status constant indicating that overall status of the logical printer is message waiting.
static int OVERALL_STATUS_NOT_YET_AVAILABLE
          Overall status constant indicating that overall status of the logical printer is powered off or not yet available.
static int OVERALL_STATUS_POWERED_OFF
          Overall status constant indicating that overall status of the logical printer is powered off.
static int OVERALL_STATUS_PRINTING
          Overall status constant indicating that overall status of the logical printer is printing.
static int OVERALL_STATUS_STOP_PENDING
          Overall status constant indicating that overall status of the logical printer is stop (pending).
static int OVERALL_STATUS_STOPPED
          Overall status constant indicating that overall status of the logical printer is stopped.
static int OVERALL_STATUS_UNAVAILABLE
          Overall status constant indicating that overall status of the logical printer is unavailable.
static int OVERALL_STATUS_UNKNOWN
          Overall status constant indicating that overall status of the logical printer is unknown.
static int OVERALL_STATUS_UNUSABLE
          Overall status constant indicating that overall status of the logical printer is unusable.
static int OVERALL_STATUS_WAITING_FOR_PRINTER
          Overall status constant indicating that overall status of the logical printer is waiting for printer.
static int OVERALL_STATUS_WAITING_FOR_PRINTER_OUTPUT
          Overall status constant indicating that overall status of the logical printer is waiting for printer output.
static int OVERALL_STATUS_WAITING_TO_START
          Overall status constant indicating that overall status of the logical printer is waiting to start.
static int PENDING_STATUS_CONTROLLED
          Pending status constant indicating that the writer ends after the current copy of the spooled file has been printed (*CNTRLD).
static int PENDING_STATUS_IMMEDIATE
          Pending status constant indicating that the writer ends as soon as its output buffers are empty (*IMMED).
static int PENDING_STATUS_NONE
          Pending status constant indicating that no command was issued.
static int PENDING_STATUS_PAGE_END
          Pending status constant indicating that the writer ends at the end of the page (*PAGEEND).
static String PRINTER_DEVICE_TYPE_IPDS
          Printer device type constant indicating that the type of the printer is Intelligent Printer Data Stream.
static String PRINTER_DEVICE_TYPE_SCS
          Printer device type constant indicating that the type of the printer is SNA (Systems Network Architecture) character string.
static int WRITER_STATUS_ENDED
          Writer status constant indicating that the status of the writer is ended.
static int WRITER_STATUS_HELD
          Writer status constant indicating that the status of the writer is held.
static int WRITER_STATUS_MESSAGE_WAITING
          Writer status constant indicating that the status of the writer is message waiting.
static int WRITER_STATUS_ON_JOB_QUEUE
          Writer status constant indicating that the status of the writer is on job queue.
static int WRITER_STATUS_STARTED
          Writer status constant indicating that the status of the writer is started.
static String WRITER_TIME_ALL_DONE
          Writer time constant indicating that the action will occur when there are no ready spooled files.
static String WRITER_TIME_CURRENT_DONE
          Writer time constant indicating that the action will occur when the current spooled file has been printed.
static String WRITER_TIME_NONE
          Writer time constant indicating that there are no pending changes to the writer.
static String WRITER_TIME_WAIT
          Writer time constant indicating that the action will not occur, it will wait for more spooled files.
static int WRITING_STATUS_FILE_SEPARATORS
          Writing status constant indicating that the writer is writing the file separators.
static int WRITING_STATUS_NOT_WRITING
          Writing status constant indicating that the writer is not in writing status.
static int WRITING_STATUS_WRITING
          Writing status constant indicating that the writer is in writing status.
 
Constructor Summary
Constructor and Description
ISeriesPrinter(AS400 system, String name)
          Constructs an ISeriesPrinter object with the specified name.
 
Method Summary
Modifier and Type Method and Description
 boolean allowsDirectPrinting()
          Returns whether or not the printer writer allows the printer to be allocated to a job that prints directly to the printer.
 boolean equals(Object obj)
          Returns whether or not the specified object is equal to this object.
 int getCopiesLeft()
          Returns the number of copies left to be printed.
 String getDescription()
          Returns the text description of the printer device.
 int getDeviceStatus()
          Returns the status of the printer device.
 int getEndPendingStatus()
          Returns whether an End Writer (ENDWTR) command has been issued for this writer.
 String getFormAlignmentMessageTime()
          Returns the time at which the forms alignment message will be sent.
 String getFormType()
          Returns the type of form being used to print the spooled file.
 int getHoldPendingStatus()
          Returns whether a Hold Writer (HLDWTR) command has been issued for this writer.
 String getMessageOption()
          Returns the message option for sending a message to the message queue when this form is finished.
 String getMessageQueue()
          Returns the fully qualified integrated file system pathname of the message queue associated with this printer.
 String getName()
          Returns the printer name.
 int getNumberOfSeparators()
          Returns the number of separator pages to be printed.
 String getOutputQueue()
          Returns the fully qualified integrated file system pathname of the output queue associated with this printer from which spooled files are selected for printing.
 int getOutputQueueStatus()
          Returns the status of the output queue from which spooled files are being selected for printing.
 int getOverallStatus()
          Returns the overall status of the logical printer.
 int getPageBeingWritten()
          Returns the page number in the spooled file that is currently being processed by the writer.
 String getPendingFormType()
          Returns the name of the next form type to be printed.
 String getPendingMessageOption()
          Returns the message option for sending a message to the message queue when the next form type is finished.
 int getPendingNumberOfSeparators()
          Returns the next number of separator pages to be printed when the change to the writer takes place.
 String getPendingOutputQueue()
          Returns the fully qualified integrated file system pathname of the next output queue.
 int getPendingSeparatorDrawer()
          Returns the drawer from which to take the separator pages if there is a change to the writer.
 String getPrinterDeviceType()
          Returns the type of printer being used to print the spooled file.
 int getSeparatorDrawer()
          Returns the drawer from which the job and file separator pages are to be taken.
 Date getSpooledFileCreationDate()
          Returns the date and time the spooled file was created on the system.
 String getSpooledFileJobName()
          Returns the name of the job that created the spooled file currently being processed by the writer.
 String getSpooledFileJobNumber()
          Returns the number of the job that created the spooled file currently being processed by the writer.
 String getSpooledFileJobSystem()
          Returns the name of the system where the job that created the spooled file ran.
 String getSpooledFileJobUser()
          Returns the user of the job that created the spooled file currently being processed by the writer.
 String getSpooledFileName()
          Returns the name of the spooled file currently being processed by the writer.
 int getSpooledFileNumber()
          Returns the number of the spooled file currently being processed by the writer.
 String getStarterUser()
          Returns the name of the user that started the writer.
 AS400 getSystem()
          Returns the system object representing the system on which the printer exists.
 int getTotalCopies()
          Returns the total number of copies to be printed.
 int getTotalPages()
          Returns the total number of pages in the spooled file.
 String getWriterChangeTime()
          Returns the time at which the pending changes to the writer take effect.
 String getWriterEndTime()
          Returns when to end the writer if it is to end automatically.
 String getWriterJobName()
          Returns the job name of the printer writer.
 String getWriterJobNumber()
          Returns the job number of the printer writer.
 String getWriterJobUser()
          Returns the name of the system user.
 byte[] getWriterMessageKey()
          Returns the key to the message that the writer is waiting for a reply.
 int getWriterStatus()
          Returns the status of the writer for this printer.
 int getWritingStatus()
          Returns whether the printer writer is in writing status.
 int hashCode()
          Returns the hash code value for the name of this ISeriesPrinter object.
 boolean isBetweenCopies()
          Returns whether the writer is between copies of a multiple copy spooled file.
 boolean isBetweenFiles()
          Returns whether the writer is between spooled files.
 boolean isHeld()
          Returns whether the writer is held.
 boolean isOnJobQueue()
          Returns whether the writer is on a job queue and is not currently running.
 boolean isPublishedInNetworkDirectory()
          Returns whether the printer is published in the network directory.
 boolean isWaitingForData()
          Returns whether the writer has written all the data currently in the spooled file and is waiting for more data.
 boolean isWaitingForDevice()
          Returns whether the writer is waiting to get the device from a job that is printing directly to the printer.
 boolean isWaitingForMessage()
          Returns whether the writer is waiting for a reply to an inquiry message.
 boolean isWriterStarted()
          Returns whether the writer is started for this printer.
 void refresh()
          Refreshes the information about this printer object from the system.
 boolean supportsAFP()
          Returns whether the printer supports Advanced Function Printing.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVICE_STATUS_VARIED_OFF

public static final int DEVICE_STATUS_VARIED_OFF
Device status constant indicating the device is in the varied off status. Constant has a value of 0.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_AS36_DISABLED

public static final int DEVICE_STATUS_AS36_DISABLED
Device status constant indicating the device is in the AS/36 disabled status. Constant has a value of 5.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_VARY_OFF_PENDING

public static final int DEVICE_STATUS_VARY_OFF_PENDING
Device status constant indicating the device is in the vary off pending status. Constant has a value of 10.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_VARY_ON_PENDING

public static final int DEVICE_STATUS_VARY_ON_PENDING
Device status constant indicating the device is in the vary on pending status. Constant has a value of 20.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_VARIED_ON

public static final int DEVICE_STATUS_VARIED_ON
Device status constant indicating the device is in the varied on status. Constant has a value of 30.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_CONNECT_PENDING

public static final int DEVICE_STATUS_CONNECT_PENDING
Device status constant indicating the device is in the connect pending status. Constant has a value of 40.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_SIGNON_DISPLAY

public static final int DEVICE_STATUS_SIGNON_DISPLAY
Device status constant indicating the device is in the signon display status. Constant has a value of 50.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_ACTIVE

public static final int DEVICE_STATUS_ACTIVE
Device status constant indicating the device is in the active status. Constant has a value of 60.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_AS36_ENABLED

public static final int DEVICE_STATUS_AS36_ENABLED
Device status constant indicating the device is in the AS/36 enabled status. Constant has a value of 62.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_ACTIVE_READER

public static final int DEVICE_STATUS_ACTIVE_READER
Device status constant indicating the device is in the active reader status. Constant has a value of 63.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_ACTIVE_WRITER

public static final int DEVICE_STATUS_ACTIVE_WRITER
Device status constant indicating the device is in the active writer status. Constant has a value of 66.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_HELD

public static final int DEVICE_STATUS_HELD
Device status constant indicating the device is in the held status. Constant has a value of 70.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_POWERED_OFF

public static final int DEVICE_STATUS_POWERED_OFF
Device status constant indicating the device is in the powered off status. Constant has a value of 75.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_RCYPND

public static final int DEVICE_STATUS_RCYPND
Device status constant indicating the device is in the RCYPND status. Constant has a value of 80.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_RCYCNL

public static final int DEVICE_STATUS_RCYCNL
Device status constant indicating the device is in the RCYCNL status. Constant has a value of 90.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_SYSTEM_REQUEST

public static final int DEVICE_STATUS_SYSTEM_REQUEST
Device status constant indicating the device is in the system request status. Constant has a value of 95.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_FAILED

public static final int DEVICE_STATUS_FAILED
Device status constant indicating the device is in the failed status. Constant has a value of 100.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_FAILED_READER

public static final int DEVICE_STATUS_FAILED_READER
Device status constant indicating the device is in the failed reader status. Constant has a value of 103.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_FAILED_WRITER

public static final int DEVICE_STATUS_FAILED_WRITER
Device status constant indicating the device is in the failed writer status. Constant has a value of 106.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_DIAGNOSTIC_MODE

public static final int DEVICE_STATUS_DIAGNOSTIC_MODE
Device status constant indicating the device is in the diagnostic mode status. Constant has a value of 110.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_DAMAGED

public static final int DEVICE_STATUS_DAMAGED
Device status constant indicating the device is in the damaged status. Constant has a value of 111.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_LOCKED

public static final int DEVICE_STATUS_LOCKED
Device status constant indicating the device is in the locked status. Constant has a value of 112.

See Also:
getDeviceStatus(), Constant Field Values

DEVICE_STATUS_UNKNOWN

public static final int DEVICE_STATUS_UNKNOWN
Device status constant indicating the device is in the unknown status. Constant has a value of 113.

See Also:
getDeviceStatus(), Constant Field Values

FORM_ALIGNMENT_WRITER

public static final String FORM_ALIGNMENT_WRITER
Form alignment constant indicating that the writer determines when the message is sent. Constant has a value of "*WTR".

See Also:
getFormAlignmentMessageTime(), Constant Field Values

FORM_ALIGNMENT_FILE

public static final String FORM_ALIGNMENT_FILE
Form alignment constant indicating that control of the page alignment is specified by each file. Constant has a value of "*FILE".

See Also:
getFormAlignmentMessageTime(), Constant Field Values

FORM_TYPE_ALL

public static final String FORM_TYPE_ALL
Form type constant indicating that the writer is started with the option to print all spooled files of any form type. Constant has a value of "*ALL".

See Also:
getFormType(), Constant Field Values

FORM_TYPE_FORMS

public static final String FORM_TYPE_FORMS
Form type constant indicating that the writer is started with the option to print all the spooled files with the same form type before using a different form type. Constant has a value of "*FORMS".

See Also:
getFormType(), Constant Field Values

FORM_TYPE_STANDARD

public static final String FORM_TYPE_STANDARD
Form type constant indicating that the writer is started with the option to print all the spooled files with a form type of *STD. Constant has a value of "*STD".

See Also:
getFormType(), Constant Field Values

MESSAGE_OPTION_STANDARD

public static final String MESSAGE_OPTION_STANDARD
Message option constant indicating that a message is sent to the message queue. Constant has a value of "*MSG".

See Also:
getMessageOption(), Constant Field Values

MESSAGE_OPTION_NONE

public static final String MESSAGE_OPTION_NONE
Message option constant indicating that no message is sent to the message queue. Constant has a value of "*NOMSG".

See Also:
getMessageOption(), Constant Field Values

MESSAGE_OPTION_INFO

public static final String MESSAGE_OPTION_INFO
Message option constant indicating that an informational message is sent to the message queue. Constant has a value of "*INFOMSG".

See Also:
getMessageOption(), Constant Field Values

MESSAGE_OPTION_INQUIRY

public static final String MESSAGE_OPTION_INQUIRY
Message option constant indicating that an inquiry message is sent to the message queue. Constant has a value of "*INQMSG".

See Also:
getMessageOption(), Constant Field Values

OUTPUT_QUEUE_STATUS_HELD

public static final int OUTPUT_QUEUE_STATUS_HELD
Output queue status constant indicating that the output queue is held. Constant has an EBCDIC value of "H".

See Also:
getOutputQueueStatus(), Constant Field Values

OUTPUT_QUEUE_STATUS_RELEASED

public static final int OUTPUT_QUEUE_STATUS_RELEASED
Output queue status constant indicating that the output queue is released. Constant has an EBCDIC value of "R".

See Also:
getOutputQueueStatus(), Constant Field Values

OVERALL_STATUS_UNAVAILABLE

public static final int OVERALL_STATUS_UNAVAILABLE
Overall status constant indicating that overall status of the logical printer is unavailable. Constant has a value of 1.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_NOT_YET_AVAILABLE

public static final int OVERALL_STATUS_NOT_YET_AVAILABLE
Overall status constant indicating that overall status of the logical printer is powered off or not yet available. Constant has a value of 2.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_STOPPED

public static final int OVERALL_STATUS_STOPPED
Overall status constant indicating that overall status of the logical printer is stopped. Constant has a value of 3.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_MESSAGE_WAITING

public static final int OVERALL_STATUS_MESSAGE_WAITING
Overall status constant indicating that overall status of the logical printer is message waiting. Constant has a value of 4.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_HELD

public static final int OVERALL_STATUS_HELD
Overall status constant indicating that overall status of the logical printer is held. Constant has a value of 5.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_STOP_PENDING

public static final int OVERALL_STATUS_STOP_PENDING
Overall status constant indicating that overall status of the logical printer is stop (pending). Constant has a value of 6.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_HOLD_PENDING

public static final int OVERALL_STATUS_HOLD_PENDING
Overall status constant indicating that overall status of the logical printer is hold (pending). Constant has a value of 7.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_WAITING_FOR_PRINTER

public static final int OVERALL_STATUS_WAITING_FOR_PRINTER
Overall status constant indicating that overall status of the logical printer is waiting for printer. Constant has a value of 8.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_WAITING_TO_START

public static final int OVERALL_STATUS_WAITING_TO_START
Overall status constant indicating that overall status of the logical printer is waiting to start. Constant has a value of 9.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_PRINTING

public static final int OVERALL_STATUS_PRINTING
Overall status constant indicating that overall status of the logical printer is printing. Constant has a value of 10.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_WAITING_FOR_PRINTER_OUTPUT

public static final int OVERALL_STATUS_WAITING_FOR_PRINTER_OUTPUT
Overall status constant indicating that overall status of the logical printer is waiting for printer output. Constant has a value of 11.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_CONNECT_PENDING

public static final int OVERALL_STATUS_CONNECT_PENDING
Overall status constant indicating that overall status of the logical printer is connect pending. Constant has a value of 12.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_POWERED_OFF

public static final int OVERALL_STATUS_POWERED_OFF
Overall status constant indicating that overall status of the logical printer is powered off. Constant has a value of 13.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_UNUSABLE

public static final int OVERALL_STATUS_UNUSABLE
Overall status constant indicating that overall status of the logical printer is unusable. Constant has a value of 14.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_BEING_SERVICED

public static final int OVERALL_STATUS_BEING_SERVICED
Overall status constant indicating that overall status of the logical printer is being serviced. Constant has a value of 15.

See Also:
getOverallStatus(), Constant Field Values

OVERALL_STATUS_UNKNOWN

public static final int OVERALL_STATUS_UNKNOWN
Overall status constant indicating that overall status of the logical printer is unknown. Constant has a value of 999.

See Also:
getOverallStatus(), Constant Field Values

PENDING_STATUS_NONE

public static final int PENDING_STATUS_NONE
Pending status constant indicating that no command was issued. Constant has an EBCDIC value of "N".

See Also:
getEndPendingStatus(), getHoldPendingStatus(), Constant Field Values

PENDING_STATUS_IMMEDIATE

public static final int PENDING_STATUS_IMMEDIATE
Pending status constant indicating that the writer ends as soon as its output buffers are empty (*IMMED). Constant has an EBCDIC value of "I".

See Also:
getEndPendingStatus(), getHoldPendingStatus(), Constant Field Values

PENDING_STATUS_CONTROLLED

public static final int PENDING_STATUS_CONTROLLED
Pending status constant indicating that the writer ends after the current copy of the spooled file has been printed (*CNTRLD). Constant has an EBCDIC value of "C".

See Also:
getEndPendingStatus(), getHoldPendingStatus(), Constant Field Values

PENDING_STATUS_PAGE_END

public static final int PENDING_STATUS_PAGE_END
Pending status constant indicating that the writer ends at the end of the page (*PAGEEND). Constant has an EBCDIC value of "P".

See Also:
getEndPendingStatus(), getHoldPendingStatus(), Constant Field Values

PRINTER_DEVICE_TYPE_SCS

public static final String PRINTER_DEVICE_TYPE_SCS
Printer device type constant indicating that the type of the printer is SNA (Systems Network Architecture) character string. Constant has a value of "*SCS".

See Also:
getPrinterDeviceType(), Constant Field Values

PRINTER_DEVICE_TYPE_IPDS

public static final String PRINTER_DEVICE_TYPE_IPDS
Printer device type constant indicating that the type of the printer is Intelligent Printer Data Stream. Constant has a value of "*IPDS".

See Also:
getPrinterDeviceType(), Constant Field Values

WRITER_STATUS_STARTED

public static final int WRITER_STATUS_STARTED
Writer status constant indicating that the status of the writer is started. Constant has a value of 1.

See Also:
getWriterStatus(), Constant Field Values

WRITER_STATUS_ENDED

public static final int WRITER_STATUS_ENDED
Writer status constant indicating that the status of the writer is ended. Constant has a value of 2.

See Also:
getWriterStatus(), Constant Field Values

WRITER_STATUS_ON_JOB_QUEUE

public static final int WRITER_STATUS_ON_JOB_QUEUE
Writer status constant indicating that the status of the writer is on job queue. Constant has a value of 3.

See Also:
getWriterStatus(), Constant Field Values

WRITER_STATUS_HELD

public static final int WRITER_STATUS_HELD
Writer status constant indicating that the status of the writer is held. Constant has a value of 4.

See Also:
getWriterStatus(), Constant Field Values

WRITER_STATUS_MESSAGE_WAITING

public static final int WRITER_STATUS_MESSAGE_WAITING
Writer status constant indicating that the status of the writer is message waiting. Constant has a value of 5.

See Also:
getWriterStatus(), Constant Field Values

WRITER_TIME_ALL_DONE

public static final String WRITER_TIME_ALL_DONE
Writer time constant indicating that the action will occur when there are no ready spooled files. Constant has a value of "*NORDYF".

See Also:
getWriterChangeTime(), getWriterEndTime(), Constant Field Values

WRITER_TIME_CURRENT_DONE

public static final String WRITER_TIME_CURRENT_DONE
Writer time constant indicating that the action will occur when the current spooled file has been printed. Constant has a value of "*FILEEND".

See Also:
getWriterChangeTime(), getWriterEndTime(), Constant Field Values

WRITER_TIME_WAIT

public static final String WRITER_TIME_WAIT
Writer time constant indicating that the action will not occur, it will wait for more spooled files. Constant has a value of "*NO".

See Also:
getWriterChangeTime(), getWriterEndTime(), Constant Field Values

WRITER_TIME_NONE

public static final String WRITER_TIME_NONE
Writer time constant indicating that there are no pending changes to the writer. Constant has a value of "".

See Also:
getWriterChangeTime(), getWriterEndTime(), Constant Field Values

WRITING_STATUS_WRITING

public static final int WRITING_STATUS_WRITING
Writing status constant indicating that the writer is in writing status. Constant has an EBCDIC value of "Y".

See Also:
getWritingStatus(), Constant Field Values

WRITING_STATUS_NOT_WRITING

public static final int WRITING_STATUS_NOT_WRITING
Writing status constant indicating that the writer is not in writing status. Constant has an EBCDIC value of "N".

See Also:
getWritingStatus(), Constant Field Values

WRITING_STATUS_FILE_SEPARATORS

public static final int WRITING_STATUS_FILE_SEPARATORS
Writing status constant indicating that the writer is writing the file separators. Constant has an EBCDIC value of "S".

See Also:
getWritingStatus(), Constant Field Values
Constructor Detail

ISeriesPrinter

public ISeriesPrinter(AS400 system,
                      String name)
Constructs an ISeriesPrinter object with the specified name. If a printer with the specified name does not exist on the specified system, an exception will be thrown when refresh() is called, either implicitly or explicitly.

Parameters:
system - The system object representing the system on which the printer exists.
name - The name of the printer.
Method Detail

allowsDirectPrinting

public boolean allowsDirectPrinting()
                             throws AS400SecurityException,
                                    ErrorCompletingRequestException,
                                    InterruptedException,
                                    IOException,
                                    ObjectDoesNotExistException
Returns whether or not the printer writer allows the printer to be allocated to a job that prints directly to the printer.

Returns:
true if direct printing is allowed; false if it is not allowed.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

equals

public boolean equals(Object obj)
Returns whether or not the specified object is equal to this object.

Overrides:
equals in class Object
Returns:
true if the specified object is an ISeriesPrinter and the following contract is true:
         obj.getSystem().equals(this.getSystem()) && obj.getName().equals(this.getName())
     
Otherwise, false is returned.

getCopiesLeft

public int getCopiesLeft()
                  throws AS400SecurityException,
                         ErrorCompletingRequestException,
                         InterruptedException,
                         IOException,
                         ObjectDoesNotExistException
Returns the number of copies left to be printed.

Returns:
The number of copies left, or 0 if no file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getDescription

public String getDescription()
                      throws AS400SecurityException,
                             ErrorCompletingRequestException,
                             InterruptedException,
                             IOException,
                             ObjectDoesNotExistException
Returns the text description of the printer device.

Returns:
The text description.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getDeviceStatus

public int getDeviceStatus()
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException,
                           ObjectDoesNotExistException
Returns the status of the printer device. Possible values are:

Returns:
The printer device status.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getEndPendingStatus

public int getEndPendingStatus()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns whether an End Writer (ENDWTR) command has been issued for this writer. Possible values are:

Returns:
The pending status.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getFormAlignmentMessageTime

public String getFormAlignmentMessageTime()
                                   throws AS400SecurityException,
                                          ErrorCompletingRequestException,
                                          InterruptedException,
                                          IOException,
                                          ObjectDoesNotExistException
Returns the time at which the forms alignment message will be sent. Possible values are:

Returns:
The form alignment message setting.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getFormType

public String getFormType()
                   throws AS400SecurityException,
                          ErrorCompletingRequestException,
                          InterruptedException,
                          IOException,
                          ObjectDoesNotExistException
Returns the type of form being used to print the spooled file. Possible values are:

Returns:
The form type.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getHoldPendingStatus

public int getHoldPendingStatus()
                         throws AS400SecurityException,
                                ErrorCompletingRequestException,
                                InterruptedException,
                                IOException,
                                ObjectDoesNotExistException
Returns whether a Hold Writer (HLDWTR) command has been issued for this writer. Possible values are:

Returns:
The pending status.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getMessageOption

public String getMessageOption()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns the message option for sending a message to the message queue when this form is finished. Possible values are:

Returns:
The message option.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getMessageQueue

public String getMessageQueue()
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException,
                              ObjectDoesNotExistException
Returns the fully qualified integrated file system pathname of the message queue associated with this printer.

Returns:
The message queue path, or "" if there is no associated message queue.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
MessageQueue

getName

public String getName()
Returns the printer name.

Returns:
The printer name.
See Also:
ISeriesPrinter(com.ibm.as400.access.AS400, java.lang.String)

getNumberOfSeparators

public int getNumberOfSeparators()
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException,
                                 ObjectDoesNotExistException
Returns the number of separator pages to be printed.

Returns:
The number of separators, or -1 if the number of separator pages is specified by each file.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getOutputQueue

public String getOutputQueue()
                      throws AS400SecurityException,
                             ErrorCompletingRequestException,
                             InterruptedException,
                             IOException,
                             ObjectDoesNotExistException
Returns the fully qualified integrated file system pathname of the output queue associated with this printer from which spooled files are selected for printing.

Returns:
The output queue path, or "" if there is no associated output queue.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
OutputQueue

getOutputQueueStatus

public int getOutputQueueStatus()
                         throws AS400SecurityException,
                                ErrorCompletingRequestException,
                                InterruptedException,
                                IOException,
                                ObjectDoesNotExistException
Returns the status of the output queue from which spooled files are being selected for printing. Possible values are:

Returns:
The output queue status.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getOverallStatus

public int getOverallStatus()
                     throws AS400SecurityException,
                            ErrorCompletingRequestException,
                            InterruptedException,
                            IOException,
                            ObjectDoesNotExistException
Returns the overall status of the logical printer. Possible values are:

Returns:
The overall status.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getPageBeingWritten

public int getPageBeingWritten()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns the page number in the spooled file that is currently being processed by the writer. The page number returned may be lower or higher than the actual page number being printed because of buffering done by the system.

Returns:
The page number being written, or 0 if no spooled file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getPendingFormType

public String getPendingFormType()
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException,
                                 ObjectDoesNotExistException
Returns the name of the next form type to be printed. Possible values are:

Returns:
The form type.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getFormType()

getPendingMessageOption

public String getPendingMessageOption()
                               throws AS400SecurityException,
                                      ErrorCompletingRequestException,
                                      InterruptedException,
                                      IOException,
                                      ObjectDoesNotExistException
Returns the message option for sending a message to the message queue when the next form type is finished. Possible values are:

Returns:
The message option.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getMessageOption()

getPendingNumberOfSeparators

public int getPendingNumberOfSeparators()
                                 throws AS400SecurityException,
                                        ErrorCompletingRequestException,
                                        InterruptedException,
                                        IOException,
                                        ObjectDoesNotExistException
Returns the next number of separator pages to be printed when the change to the writer takes place.

Returns:
The number of separators, or -1 if the number of separator pages is specified by each file, or -10 if there is no pending change to the writer.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getNumberOfSeparators()

getPendingOutputQueue

public String getPendingOutputQueue()
                             throws AS400SecurityException,
                                    ErrorCompletingRequestException,
                                    InterruptedException,
                                    IOException,
                                    ObjectDoesNotExistException
Returns the fully qualified integrated file system pathname of the next output queue.

Returns:
The output queue path, or "" if no changes have been made to the writer.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getOutputQueue(), OutputQueue

getPendingSeparatorDrawer

public int getPendingSeparatorDrawer()
                              throws AS400SecurityException,
                                     ErrorCompletingRequestException,
                                     InterruptedException,
                                     IOException,
                                     ObjectDoesNotExistException
Returns the drawer from which to take the separator pages if there is a change to the writer. Possible values are:

Returns:
The separator drawer.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getSeparatorDrawer()

getPrinterDeviceType

public String getPrinterDeviceType()
                            throws AS400SecurityException,
                                   ErrorCompletingRequestException,
                                   InterruptedException,
                                   IOException,
                                   ObjectDoesNotExistException
Returns the type of printer being used to print the spooled file. Possible values are:

Returns:
The printer device type.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getSeparatorDrawer

public int getSeparatorDrawer()
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException,
                              ObjectDoesNotExistException
Returns the drawer from which the job and file separator pages are to be taken. Possible values are:

Returns:
The separator drawer.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getSpooledFileCreationDate

public Date getSpooledFileCreationDate()
                                throws AS400SecurityException,
                                       ErrorCompletingRequestException,
                                       InterruptedException,
                                       IOException,
                                       ObjectDoesNotExistException
Returns the date and time the spooled file was created on the system.

Returns:
The spooled file creation date, or null if no spooled file is printing. If the system is not running system operating system release V5R2M0 or higher, null is returned.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getSpooledFileJobName

public String getSpooledFileJobName()
                             throws AS400SecurityException,
                                    ErrorCompletingRequestException,
                                    InterruptedException,
                                    IOException,
                                    ObjectDoesNotExistException
Returns the name of the job that created the spooled file currently being processed by the writer.

Returns:
The job name, or "" if no spooled file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
Job

getSpooledFileJobNumber

public String getSpooledFileJobNumber()
                               throws AS400SecurityException,
                                      ErrorCompletingRequestException,
                                      InterruptedException,
                                      IOException,
                                      ObjectDoesNotExistException
Returns the number of the job that created the spooled file currently being processed by the writer.

Returns:
The job number, or "" if no spooled file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
Job

getSpooledFileJobSystem

public String getSpooledFileJobSystem()
                               throws AS400SecurityException,
                                      ErrorCompletingRequestException,
                                      InterruptedException,
                                      IOException,
                                      ObjectDoesNotExistException
Returns the name of the system where the job that created the spooled file ran.

Returns:
The system name, or "" if no spooled file is printing, or null if the system is not running system operating system release V5R2M0 or higher.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getSpooledFileJobUser

public String getSpooledFileJobUser()
                             throws AS400SecurityException,
                                    ErrorCompletingRequestException,
                                    InterruptedException,
                                    IOException,
                                    ObjectDoesNotExistException
Returns the user of the job that created the spooled file currently being processed by the writer.

Returns:
The user name, or "" if no spooled file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
Job, User

getSpooledFileName

public String getSpooledFileName()
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException,
                                 ObjectDoesNotExistException
Returns the name of the spooled file currently being processed by the writer.

Returns:
The spooled file name, or "" if no spooled file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getSpooledFileNumber

public int getSpooledFileNumber()
                         throws AS400SecurityException,
                                ErrorCompletingRequestException,
                                InterruptedException,
                                IOException,
                                ObjectDoesNotExistException
Returns the number of the spooled file currently being processed by the writer.

Returns:
The spooled file number, or 0 if no spooled file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getStarterUser

public String getStarterUser()
                      throws AS400SecurityException,
                             ErrorCompletingRequestException,
                             InterruptedException,
                             IOException,
                             ObjectDoesNotExistException
Returns the name of the user that started the writer.

Returns:
The user name.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
User

getSystem

public AS400 getSystem()
Returns the system object representing the system on which the printer exists.

Returns:
The system object representing the system on which the printer exists.
See Also:
ISeriesPrinter(com.ibm.as400.access.AS400, java.lang.String)

getTotalCopies

public int getTotalCopies()
                   throws AS400SecurityException,
                          ErrorCompletingRequestException,
                          InterruptedException,
                          IOException,
                          ObjectDoesNotExistException
Returns the total number of copies to be printed.

Returns:
The number of copies.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getTotalPages

public int getTotalPages()
                  throws AS400SecurityException,
                         ErrorCompletingRequestException,
                         InterruptedException,
                         IOException,
                         ObjectDoesNotExistException
Returns the total number of pages in the spooled file.

Returns:
The number of pages, or 0 if no spooled file is printing.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getWriterChangeTime

public String getWriterChangeTime()
                           throws AS400SecurityException,
                                  ErrorCompletingRequestException,
                                  InterruptedException,
                                  IOException,
                                  ObjectDoesNotExistException
Returns the time at which the pending changes to the writer take effect. Possible values are:

Returns:
The writer change setting.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getWriterEndTime

public String getWriterEndTime()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns when to end the writer if it is to end automatically. Possible values are:

Returns:
The writer end time setting.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getWriterJobName

public String getWriterJobName()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns the job name of the printer writer.

Returns:
The job name.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getWriterJobNumber(), getWriterJobUser(), Job

getWriterJobNumber

public String getWriterJobNumber()
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException,
                                 ObjectDoesNotExistException
Returns the job number of the printer writer.

Returns:
The job number.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getWriterJobName(), getWriterJobUser(), Job

getWriterJobUser

public String getWriterJobUser()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns the name of the system user.

Returns:
The user name.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
getWriterJobName(), getWriterJobNumber(), Job, User

getWriterMessageKey

public byte[] getWriterMessageKey()
                           throws AS400SecurityException,
                                  ErrorCompletingRequestException,
                                  InterruptedException,
                                  IOException,
                                  ObjectDoesNotExistException
Returns the key to the message that the writer is waiting for a reply.

Returns:
The 4-byte message key, which will consist of all 0x40's if the writer is not waiting for a reply to an inquiry message.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getWriterStatus

public int getWriterStatus()
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException,
                           ObjectDoesNotExistException
Returns the status of the writer for this printer. Possible values are:

Returns:
The writer status.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getWritingStatus

public int getWritingStatus()
                     throws AS400SecurityException,
                            ErrorCompletingRequestException,
                            InterruptedException,
                            IOException,
                            ObjectDoesNotExistException
Returns whether the printer writer is in writing status. Possible values are:

Returns:
The writing status.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

hashCode

public int hashCode()
Returns the hash code value for the name of this ISeriesPrinter object.

Overrides:
hashCode in class Object
Returns:
The hash code.

isBetweenCopies

public boolean isBetweenCopies()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns whether the writer is between copies of a multiple copy spooled file.

Returns:
true if the writer is between copies, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isBetweenFiles

public boolean isBetweenFiles()
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException,
                              ObjectDoesNotExistException
Returns whether the writer is between spooled files.

Returns:
true if the writer is between spooled files, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isHeld

public boolean isHeld()
               throws AS400SecurityException,
                      ErrorCompletingRequestException,
                      InterruptedException,
                      IOException,
                      ObjectDoesNotExistException
Returns whether the writer is held.

Returns:
true if the writer is held, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isOnJobQueue

public boolean isOnJobQueue()
                     throws AS400SecurityException,
                            ErrorCompletingRequestException,
                            InterruptedException,
                            IOException,
                            ObjectDoesNotExistException
Returns whether the writer is on a job queue and is not currently running.

Returns:
true if the writer is on a job queue, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isPublishedInNetworkDirectory

public boolean isPublishedInNetworkDirectory()
                                      throws AS400SecurityException,
                                             ErrorCompletingRequestException,
                                             InterruptedException,
                                             IOException,
                                             ObjectDoesNotExistException
Returns whether the printer is published in the network directory.

Returns:
true if the printer is published, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isWaitingForData

public boolean isWaitingForData()
                         throws AS400SecurityException,
                                ErrorCompletingRequestException,
                                InterruptedException,
                                IOException,
                                ObjectDoesNotExistException
Returns whether the writer has written all the data currently in the spooled file and is waiting for more data.

Returns:
true if the writer is waiting for more data when the writer is producing an open spooled file with SCHEDULE(*IMMED) specified; false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isWaitingForDevice

public boolean isWaitingForDevice()
                           throws AS400SecurityException,
                                  ErrorCompletingRequestException,
                                  InterruptedException,
                                  IOException,
                                  ObjectDoesNotExistException
Returns whether the writer is waiting to get the device from a job that is printing directly to the printer.

Returns:
true if the writer is waiting for the device, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isWaitingForMessage

public boolean isWaitingForMessage()
                            throws AS400SecurityException,
                                   ErrorCompletingRequestException,
                                   InterruptedException,
                                   IOException,
                                   ObjectDoesNotExistException
Returns whether the writer is waiting for a reply to an inquiry message.

Returns:
true if the writer is waiting for a reply, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

isWriterStarted

public boolean isWriterStarted()
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns whether the writer is started for this printer.

Returns:
true if the writer is started, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

refresh

public void refresh()
             throws AS400SecurityException,
                    ErrorCompletingRequestException,
                    InterruptedException,
                    IOException,
                    ObjectDoesNotExistException
Refreshes the information about this printer object from the system. This method is implicitly called by the getXXX() methods on this class the first time. Call this method explicitly to refresh the information returned by the various getXXX() methods.

Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

supportsAFP

public boolean supportsAFP()
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException,
                           ObjectDoesNotExistException
Returns whether the printer supports Advanced Function Printing.

Returns:
true if Advanced Function Printing is supported, false otherwise.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.