return handler.unsupportedLoader(httpServletResponse, referenceId);
} else {
return handler.successfulPrint(successfulPrintJob, httpServletResponse, pdfURI, loader);
}
} else if (metadata.get() instanceof FailedPrintJob) {
FailedPrintJob failedPrintJob = (FailedPrintJob) metadata.get();
return handler.failedPrint(failedPrintJob, httpServletResponse);
} else {
throw new ServletException("Unexpected state");
}