posted 2 days ago
There may be an additional issue in that Java Print Services is probably going to return the logical printer names as defined to the local machine OS and not the canonical printer names and locations.
In and of itself, that's insufficient. It won't even tell you which machine the printer is on, much less the interface type (Centronics Parallel, USB, Ethernet, WiFi, etc.). Some interfaces, such as the old-style parallel were one-way and thus impossible to query. SNMP only works for direct network connections. It wouldn't work on my printer, because it's a USB device on a remote CUPS server.
So a universal solution - especially one that doesn't allow intrusion into remote systems - is probably impossible. If you have a specific set of printers - and they have direct network IP addresses - AND if you are allowed SNMP access to them, then you'll be able to use Java SNMP queries to find out more. Note that the OIDs returned for different printer models and manufacturers may vary so it's going to be more confirming your guesses than directly obtaining what you want.
As I mentioned, my own printer is presently connected as a USB device to a print server machine. Although initially I'd used a parallel-port cable. For comparison with SNMP, this is what a remote shell "lspci" command tells me about it:
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.