public class ZebraPrinterFactory extends Object
Modifier and Type | Method and Description |
---|---|
static ZebraPrinterLinkOs |
createLinkOsPrinter(ZebraPrinter genericPrinter)
Create a wrapper around a Zebra printer that provides access to Link-OS features.
|
static ZebraPrinterLinkOs |
createLinkOsPrinter(ZebraPrinter genericPrinter,
LinkOsInformation info)
Create a wrapper around a Zebra printer that provides access to Link-OS features.
|
static ZebraPrinterLinkOs |
createLinkOsPrinter(ZebraPrinter genericPrinter,
LinkOsInformation info,
PrinterLanguage language)
Create a wrapper around a Zebra printer that provides access to Link-OS features.
|
static ZebraPrinterLinkOs |
createLinkOsPrinter(ZebraPrinter genericPrinter,
PrinterLanguage language)
Create a wrapper around a Zebra printer that provides access to Link-OS features.
|
static ZebraPrinter |
getInstance(Connection connection)
Factory method to create the correct
ZebraPrinter concrete class based on the printer's control language. |
static ZebraPrinter |
getInstance(PrinterLanguage language,
Connection connection)
Factory method to create the correct
ZebraPrinter concrete class based on the provided printer control
language. |
static ZebraPrinter |
getInstance(String[] cpclFwVersionPrefixes,
Connection connection)
Factory method to create the correct
ZebraPrinter concrete class based on the printer's control language. |
static ZebraPrinterLinkOs |
getLinkOsPrinter(Connection connection)
Create Link-OS Zebra printer from a connection that provides access to Link-OS features.
|
static ZebraPrinterLinkOs |
getLinkOsPrinter(Connection connection,
LinkOsInformation info)
Create Link-OS Zebra printer from a connection that provides access to Link-OS features.
|
static ZebraPrinterLinkOs |
getLinkOsPrinter(Connection connection,
LinkOsInformation info,
PrinterLanguage language)
Create Link-OS Zebra printer from a connection that provides access to Link-OS features.
|
static ZebraPrinterLinkOs |
getLinkOsPrinter(Connection connection,
PrinterLanguage language)
Create Link-OS Zebra printer from a connection that provides access to Link-OS features.
|
public static ZebraPrinter getInstance(Connection connection) throws ConnectionException, ZebraPrinterLanguageUnknownException
ZebraPrinter
concrete class based on the printer's control language.
If the Set-Get-Do value, appl.name
, starts with one of the following, the printer is determined to
be a CPCL printer. Otherwise it is considered to be a ZPL printergetInstance(String[], Connection)
connection
- an open connection to a printerZebraPrinter
ConnectionException
- if an I/O error occursZebraPrinterLanguageUnknownException
- if the printer language cannot be determinedpublic static ZebraPrinter getInstance(String[] cpclFwVersionPrefixes, Connection connection) throws ConnectionException, ZebraPrinterLanguageUnknownException
ZebraPrinter
concrete class based on the printer's control language.
If the Set-Get-Do value, appl.name
, starts with one of the cpclFwVersionPrefixes
, the
printer is determined to be a CPCL printer. Otherwise it is considered to be a ZPL printercpclFwVersionPrefixes
- an array of possible CPCL version number prefixesconnection
- an open connection to a printerZebraPrinter
ConnectionException
- if an I/O error occursZebraPrinterLanguageUnknownException
- if the printer language cannot be determinedpublic static ZebraPrinter getInstance(PrinterLanguage language, Connection connection) throws ConnectionException
ZebraPrinter
concrete class based on the provided printer control
language.language
- the language of the printer instance to be createdconnection
- an open connection to a printerZebraPrinter
ConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs createLinkOsPrinter(ZebraPrinter genericPrinter) throws ConnectionException
genericPrinter
- An instance of a ZebraPrinter
.ConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs createLinkOsPrinter(ZebraPrinter genericPrinter, LinkOsInformation info) throws ConnectionException
genericPrinter
- An instance of a ZebraPrinter
.info
- Link-OS InformationConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs createLinkOsPrinter(ZebraPrinter genericPrinter, PrinterLanguage language) throws ConnectionException
genericPrinter
- An instance of a ZebraPrinter
.language
- The printer control languageConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs createLinkOsPrinter(ZebraPrinter genericPrinter, LinkOsInformation info, PrinterLanguage language) throws ConnectionException
info
and language.
genericPrinter
- An instance of a ZebraPrinter
.info
- Link-OS Informationlanguage
- The printer control languageConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs getLinkOsPrinter(Connection connection) throws ConnectionException
connection
- an open connection to a Link-OS printerConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs getLinkOsPrinter(Connection connection, LinkOsInformation info) throws ConnectionException
connection
- an open connection to a Link-OS printerinfo
- Link-OS InformationConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs getLinkOsPrinter(Connection connection, PrinterLanguage language) throws ConnectionException
connection
- an open connection to a Link-OS printerlanguage
- The printer control languageConnectionException
- if an I/O error occurspublic static ZebraPrinterLinkOs getLinkOsPrinter(Connection connection, LinkOsInformation info, PrinterLanguage language) throws ConnectionException
info
and
language.
connection
- an open connection to a Link-OS printerinfo
- Link-OS Informationlanguage
- The printer control languageConnectionException
- if an I/O error occurs
© 2015 ZIH Corp. All Rights Reserved.