Package com.zebra.sdk.printer.discovery
Class DiscoveredPrinter
Object
com.zebra.sdk.printer.discovery.DiscoveredPrinter
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DiscoveredPrinterDriver,DiscoveredPrinterNetwork,DiscoveredUsbPrinter
Container holding information about a discovered printer.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDiscoveredPrinter(String address) Creates an object holding information about a discovered printer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if two discovered printer objects have the same address, otherwise it returns false.abstract ConnectionCreates a connection based on the information in the DiscoveredPrinter response.This method will return aMapof all settings obtained via the chosen discovery method.inthashCode()Returns a hash code for this DiscoveredPrinter.toString()For TCP, this returns the IP Address.
For driver, this returns the local printer name.
-
Field Details
-
address
MAC address, IP Address, or local name of printer.
-
-
Constructor Details
-
DiscoveredPrinter
Creates an object holding information about a discovered printer.- Parameters:
address- MAC address, IP Address, or local name of printer.
-
-
Method Details
-
getConnection
Creates a connection based on the information in the DiscoveredPrinter response.- Returns:
- a
Connectionto the discovered printer
-
toString
For TCP, this returns the IP Address.
For driver, this returns the local printer name. -
getDiscoveryDataMap
This method will return aMapof all settings obtained via the chosen discovery method.
The names of the settings will vary depending upon the type of connection to the printer. The following example shows how to list all the properties of the discovered printer with the respective value.for (String settingsKey : printer.getDiscoveryDataMap().keySet()) { System.out.println("Key: " + settingsKey + " Value: " + printer.getDiscoveryDataMap().get(settingsKey)); }- Returns:
Map<String, String>containing available attributes of the discovered printer.
-
equals
Returns true if two discovered printer objects have the same address, otherwise it returns false. -
hashCode
public int hashCode()Returns a hash code for this DiscoveredPrinter.
-