public final class PrintEventBroadcaster extends Object
Customized realisations of PrintEventListener
should be
attached to this broadcaster to monitor the status of running printer jobs processed by jadice
printing api.
The print state 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 listeners.
See also
PrintEvent
,
PrintEventListener
.
Modifier and Type | Method and Description |
---|---|
static void |
addPrintListener(PrintEventListener listener)
Add the given
PrintEventListener to its list of registerd print listeners. |
static void |
firePrintStateChanged(PrintEvent evt)
Forwards the print event to all registered listeners.
|
static int |
getPrintListenerCount()
Returns the total number of registered print listeners
|
static PrintEventListener[] |
getPrintListeners()
Returns an array of all registered print listeners.
|
static String |
getStacktraceAsString(Throwable t)
Returns a string describing given throwable and its backtrace.
|
static void |
removePrintListener(PrintEventListener listener)
Removes given
PrintEventListener from its list of registerd print listeners. |
public static void addPrintListener(PrintEventListener listener)
PrintEventListener
to its list of registerd print listeners. null
or is not already registered nothing will happen.listener
- the print listener to addpublic static int getPrintListenerCount()
public static PrintEventListener[] getPrintListeners()
public static void removePrintListener(PrintEventListener listener)
PrintEventListener
from its list of registerd print listeners. null
or is not registered to this class nothing will happen.listener
- the print listener to removepublic static void firePrintStateChanged(PrintEvent evt)
evt
- PrintEvent describing which printing event took placeCopyright © 2024 levigo holding gmbh. All rights reserved.