|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.printer.event.PrintEventBroadcaster
public final class PrintEventBroadcaster
This class broadcasts print events of all jadice print processes to registered print listeners.
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
.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 placepublic static String getStacktraceAsString(Throwable t)
t
-
String
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |