public abstract class DiscoveredPrinter extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
String |
address
MAC address, IP Address, or local name of printer.
|
Constructor and Description |
---|
DiscoveredPrinter(String address)
Creates an object holding information about a discovered printer.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Returns true if two discovered printer objects have the same address, otherwise it returns false.
|
abstract Connection |
getConnection()
Creates a connection based on the information in the DiscoveredPrinter response.
|
Map<String,String> |
getDiscoveryDataMap()
This method will return a
Map of all settings obtained via the chosen discovery method. |
int |
hashCode()
Returns a hash code for this DiscoveredPrinter.
|
String |
toString()
For TCP, this returns the IP Address.
|
public final String address
public DiscoveredPrinter(String address)
address
- MAC address, IP Address, or local name of printer.public abstract Connection getConnection()
Connection
to the discovered printerpublic String toString()
toString
in class Object
Object.toString()
public Map<String,String> getDiscoveryDataMap()
Map
of all settings obtained via the chosen discovery method. for (String settingsKey : printer.getDiscoveryDataMap().keySet()) { System.out.println("Key: " + settingsKey + " Value: " + printer.getDiscoveryDataMap().get(settingsKey)); }
Map
containing available attributes of the discovered printer.public boolean equals(Object o)
equals
in class Object
o
- DiscoveredPrinter object to compare against.Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
© 2015 ZIH Corp. All Rights Reserved.