This code example shows how to use the following methods:getPrintService, setPrintService

* @param printJob
* the print job to affect
*/
private ForcedAcceptPrintService(PrinterJobprintJob) {
this.thePrintJob = printJob;
this.delegate = printJob.getPrintService();
try {
thePrintJob.setPrintService(this);
// replace the private PrintService field on the PrintJob instance with a reference
// to our replacement PrintService so that we can intercept calls to getAttributes().
// it is expected that the first thing the PrintJob will do is check it's PrintService's
// PrinterIsAcceptingJobs attribute, at which point we'll force it to think it is accepting
// jobs and restore the PrintService to the original instance to get out of the way.
// The only real requirement is that the PrintJob does not cast the PrintService
// to it's expected type until after it has checked the PrinterIsAcceptingJobs
// attribute.
} catch (PrinterExceptione) {
AuditLog.logError(LOGGER, e, "Set Print Service"); //$NON-NLS-1$