|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.printer.event.PrintErrorBroadcaster
public final class PrintErrorBroadcaster
This class forwards print errors of all jadice print processes to registered print error handlers.
Customized realizations of PrintErrorHandler
should be
attached to this broadcaster to retrieve informations about occurred PrinterException
of
running printer jobs processed by jadice printing API.
The print error monitoring may be invoked on the thread processing the print job, or a service created notification thread. In either case developers are strongly encouraged not perform time consuming processes in the callback method of the attached print error handlers.
See also
PrinterException
,
PrintErrorHandler
.
Method Summary | |
---|---|
static void |
addPrintErrorHandler(PrintErrorHandler handler)
Add the given PrintErrorHandler to the registered print error handlers. |
static void |
firePrinterError(PrinterException printerException,
AbstractPrinter printer,
PrinterJob job)
Forwards the print event to all registered error handlers. |
static int |
getPrintErrorHandlerCount()
Returns the total number of registered print error handlers |
static List<PrintErrorHandler> |
getPrintErrorHandlers()
Returns a snapshot copy as list of all registered print error handlers. |
static void |
removeErrorHandler(PrintErrorHandler handler)
Removes given PrintErrorHandler from its list of registered print error handlers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void addPrintErrorHandler(PrintErrorHandler handler)
PrintErrorHandler
to the registered print error handlers. null
or is not already registered nothing will happen.
handler
- the print error handler to addpublic static int getPrintErrorHandlerCount()
public static List<PrintErrorHandler> getPrintErrorHandlers()
public static void removeErrorHandler(PrintErrorHandler handler)
PrintErrorHandler
from its list of registered print error handlers. null
or is not registered to this class nothing will happen.
handler
- the print error handler to removepublic static void firePrinterError(PrinterException printerException, AbstractPrinter printer, PrinterJob job)
printerException
- printer
- job
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |