Class AbstractPrinter
java.lang.Object
oshi.hardware.common.AbstractPrinter
- All Implemented Interfaces:
Printer
- Direct Known Subclasses:
CupsPrinter, WindowsPrinter
Abstract base class for Printer implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Printer
Printer.PrinterStatus -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPrinter(String name, String driverName, String description, Printer.PrinterStatus status, String statusReason, boolean isDefault, boolean isLocal, String portName) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the user-friendly description of the printer.Retrieves the driver name or make/model of the printer.getName()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.booleanIndicates whether this is the default printer.booleanisLocal()Indicates whether this is a local printer (as opposed to a network printer).toString()
-
Constructor Details
-
AbstractPrinter
-
-
Method Details
-
getName
-
getDriverName
Description copied from interface:PrinterRetrieves the driver name or make/model of the printer.- Specified by:
getDriverNamein interfacePrinter- Returns:
- The driver or model name.
-
getDescription
Description copied from interface:PrinterRetrieves the user-friendly description of the printer.- Specified by:
getDescriptionin interfacePrinter- Returns:
- The printer description.
-
getStatus
Description copied from interface:PrinterRetrieves the current status of the printer. -
getStatusReason
Description copied from interface:PrinterRetrieves the reason for the current printer status, if available.- Specified by:
getStatusReasonin interfacePrinter- Returns:
- A string describing the status reason (e.g., "Paper Jam", "media-empty"), or empty string if none.
-
isDefault
-
isLocal
-
getPortName
Description copied from interface:PrinterRetrieves the port name or device URI of the printer.- Specified by:
getPortNamein interfacePrinter- Returns:
- The port name or URI.
-
toString
-