Listeners when using hylafax from Java
- by DaDaDom
I am trying to send a fax to a hylafax server via Java:
Client faxClient = new HylaFAXClient();
faxClient.open(...);
faxClient.user(...);
faxClient.pass(...);
Job j = faxClient.createJob();
job.setStuff(...);
job.setNotifyType(Job.NOTIFY_ALL);
faxClient.addTransferListener(new FaxTransferListener());
faxClient.addConnectionListiener(new FaxConnectionListener());
faxClient.submit(job);
The problem is that I don't get any notifications on any of the listener methods.
When I watch the queues on the hylafax server, e.g. via JHylaFax, the job failed, but how can I react to that event programatically on client side without having to poll the job queues regularly?