1 package psl; 2 3 4 /** 5 * Handlers that is invoked when an exception is thrown in a 6 * {@link DispatcherThread}. 7 */ 8 public interface ExceptionHandler { 9 /** 10 * A throwable has been thrown when running a task in a dispatcher 11 * thread. 12 * @param task the runnable, cannot be <code>null</code> 13 * @param t the throwable, cannot be <code>null</code> 14 * @param dt the dispatcher thread, cannot be <code>null</code> 15 */ 16 void thrown(Runnable task, Throwable t, Thread dt); 17 18 /** 19 * A throwable has been thrown when notifying a subscriber of a 20 * dispatch operation. 21 * @param op the dispatch operation, cannot be <code>null</code> 22 * @param subscriber the subscriber being notified, cannot be 23 * <code>null</code> 24 * @param t the throwable, cannot be <code>null</code> 25 * @param dt the dispatcher thread, cannot be <code>null</code> 26 */ 27 void thrown(DispatcherOp<?> op, Object subscriber, Throwable t, Thread dt); 28 29 /** 30 * A throwable has been thrown in some other situation (<em>e.g.</em>, 31 * creating a thread). 32 * @param t the throwable, cannot be <code>null</code> 33 */ 34 void thrown(Throwable t); 35 }