}
private void notifyEvent(int reason) {
synchronized (this) {
if (jobListeners != null) {
PrintJobListener listener;
PrintJobEvent event = new PrintJobEvent(this, reason);
for (int i = 0; i < jobListeners.size(); i++) {
listener = (PrintJobListener)(jobListeners.elementAt(i));
switch (reason) {
case PrintJobEvent.JOB_CANCELED :
listener.printJobCanceled(event);
break;
case PrintJobEvent.JOB_FAILED :
listener.printJobFailed(event);
break;
case PrintJobEvent.DATA_TRANSFER_COMPLETE :
listener.printDataTransferCompleted(event);
break;
case PrintJobEvent.NO_MORE_EVENTS :
listener.printJobNoMoreEvents(event);
break;
case PrintJobEvent.JOB_COMPLETE :
listener.printJobCompleted(event);
break;
default:
break;
}