Interface Printer

All Known Implementing Classes:
AbstractPrinter, UnixPrinter

@Immutable public interface Printer
Printer interface representing a printer device.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Printer status enumeration.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the user-friendly description of the printer.
    Retrieves the driver name or make/model of the printer.
    Retrieves the name of the printer.
    Retrieves the port name or device URI of the printer.
    Retrieves the current status of the printer.
    Retrieves the reason for the current printer status, if available.
    boolean
    Indicates whether this is the default printer.
    boolean
    Indicates whether this is a local printer (as opposed to a network printer).
  • Method Details

    • getName

      String getName()
      Retrieves the name of the printer.
      Returns:
      The printer name.
    • getDriverName

      String getDriverName()
      Retrieves the driver name or make/model of the printer.
      Returns:
      The driver or model name.
    • getDescription

      String getDescription()
      Retrieves the user-friendly description of the printer.
      Returns:
      The printer description.
    • getStatus

      Retrieves the current status of the printer.
      Returns:
      The printer status.
    • getStatusReason

      String getStatusReason()
      Retrieves the reason for the current printer status, if available.
      Returns:
      A string describing the status reason (e.g., "Paper Jam", "media-empty"), or empty string if none.
    • isDefault

      boolean isDefault()
      Indicates whether this is the default printer.
      Returns:
      true if this is the default printer, false otherwise.
    • isLocal

      boolean isLocal()
      Indicates whether this is a local printer (as opposed to a network printer).
      Returns:
      true if this is a local printer, false if it is a network printer.
    • getPortName

      String getPortName()
      Retrieves the port name or device URI of the printer.
      Returns:
      The port name or URI.