aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to listen to Network printer spolled jobs on linux environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to listen to Network printer spolled jobs on linux environment" Watch "How to listen to Network printer spolled jobs on linux environment" New topic
Author

How to listen to Network printer spolled jobs on linux environment

swethana garigapati
Greenhorn

Joined: May 29, 2014
Posts: 11


Hi,

How to Listen and Monitor spooled jobs in a network printer and tracking which job went to what printer, on the network using JAVA API.


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
What is the underlying problem you're trying to solve? It sounds a bit as if you're trying to create a print server... ?


Ping & DNS - my free Android networking tools app
swethana garigapati
Greenhorn

Joined: May 29, 2014
Posts: 11
swethana garigapati wrote:

Hi,

How to Listen and Monitor spooled jobs in a network printer and tracking which job went to what printer, on the network using JAVA API.




I need to track all the jobs in printer queue in the network. I need to implement this concept in my project.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
What "queue" is that - a print server's queue, or a printer's queue? Or all queues of all printers?

Without knowing the details, Java does not seem a good choice of language for this. It can't listen to raw network traffic unless you wanted to use JNI with a library like Jpcap or JNetPcap.

One other approach would be to use SNMP (assuming that the printer or print server provides all the info you need via that); there's a Java client library called snmp4j.

For both approaches you will need to do a lot of digging around on a low network level, though, and I think it's not a given that you will succeed.
swethana garigapati
Greenhorn

Joined: May 29, 2014
Posts: 11

I want all spooled job queues of printer in the network.

My project requirement is using java Api I need to listen all the jobs of the printer in the network
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
"using Java API" can't really be a requirement - that's an implementation decision. (Or if it is, I suggest you challenge that with whoever gave you this task.)

But as I said, using SNMP, or one of the network libraries via JNI, still qualifies as "using Java". But they're not guaranteed to work, in my opinion.

On what OS should this solution run?
swethana garigapati
Greenhorn

Joined: May 29, 2014
Posts: 11


I need to run on Linux Environment. We are developing projects in Java, So I need to code using java only.

Please suggest me some Java api's which can be useful for me.


Thanks..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
I already mentioned three. As I said, you will need to do some serious poking around on the network level to find out whether either packet capture or SNMP will even work; start by talking to the system administrator in charge of the network and printers where this would run.

We are developing projects in Java, So I need to code using java only.

I think you need to prepare yourself and your manager for a decision at some point between not using Java, and not being able to finish this. With some luck it won't come to that, but I think it may well do so.
 
jQuery in Action, 2nd edition
 
subject: How to listen to Network printer spolled jobs on linux environment