com.ibm.as400.access

Class ISeriesPrinter

  • java.lang.Object
    • com.ibm.as400.access.ISeriesPrinter
  • All Implemented Interfaces:
    java.io.Serializable


    public class ISeriesPrinter
    extends java.lang.Object
    implements java.io.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

      Fields 
      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 java.lang.String FORM_ALIGNMENT_FILE
      Form alignment constant indicating that control of the page alignment is specified by each file.
      static java.lang.String FORM_ALIGNMENT_WRITER
      Form alignment constant indicating that the writer determines when the message is sent.
      static java.lang.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 java.lang.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 java.lang.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 java.lang.String MESSAGE_OPTION_INFO
      Message option constant indicating that an informational message is sent to the message queue.
      static java.lang.String MESSAGE_OPTION_INQUIRY
      Message option constant indicating that an inquiry message is sent to the message queue.
      static java.lang.String MESSAGE_OPTION_NONE
      Message option constant indicating that no message is sent to the message queue.
      static java.lang.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 java.lang.String PRINTER_DEVICE_TYPE_IPDS
      Printer device type constant indicating that the type of the printer is Intelligent Printer Data Stream.
      static java.lang.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 java.lang.String WRITER_TIME_ALL_DONE
      Writer time constant indicating that the action will occur when there are no ready spooled files.
      static java.lang.String WRITER_TIME_CURRENT_DONE
      Writer time constant indicating that the action will occur when the current spooled file has been printed.
      static java.lang.String WRITER_TIME_NONE
      Writer time constant indicating that there are no pending changes to the writer.
      static java.lang.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

      Constructors 
      Constructor and Description
      ISeriesPrinter(AS400 system, java.lang.String name)
      Constructs an ISeriesPrinter object with the specified name.
    • Method Summary

      Methods 
      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(java.lang.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.
      java.lang.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.
      java.lang.String getFormAlignmentMessageTime()
      Returns the time at which the forms alignment message will be sent.
      java.lang.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.
      java.lang.String getMessageOption()
      Returns the message option for sending a message to the message queue when this form is finished.
      java.lang.String getMessageQueue()
      Returns the fully qualified integrated file system pathname of the message queue associated with this printer.
      java.lang.String getName()
      Returns the printer name.
      int getNumberOfSeparators()
      Returns the number of separator pages to be printed.
      java.lang.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.
      java.lang.String getPendingFormType()
      Returns the name of the next form type to be printed.
      java.lang.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.
      java.lang.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.
      java.lang.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.
      java.util.Date getSpooledFileCreationDate()
      Returns the date and time the spooled file was created on the system.
      java.lang.String getSpooledFileJobName()
      Returns the name of the job that created the spooled file currently being processed by the writer.
      java.lang.String getSpooledFileJobNumber()
      Returns the number of the job that created the spooled file currently being processed by the writer.
      java.lang.String getSpooledFileJobSystem()
      Returns the name of the system where the job that created the spooled file ran.
      java.lang.String getSpooledFileJobUser()
      Returns the user of the job that created the spooled file currently being processed by the writer.
      java.lang.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.
      java.lang.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.
      java.lang.String getWriterChangeTime()
      Returns the time at which the pending changes to the writer take effect.
      java.lang.String getWriterEndTime()
      Returns when to end the writer if it is to end automatically.
      java.lang.String getWriterJobName()
      Returns the job name of the printer writer.
      java.lang.String getWriterJobNumber()
      Returns the job number of the printer writer.
      java.lang.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