001    /*
002     * Copyright (c) 2003, The Regents of the University of California, through
003     * Lawrence Berkeley National Laboratory (subject to receipt of any required
004     * approvals from the U.S. Dept. of Energy). All rights reserved.
005     */
006    package gov.lbl.dsd.sea;
007    
008    
009    /**
010     * Callback invoked if a {@link RuntimeException} is raised within
011     * {@link EventHandler#handle(Object)} of the given source stage.
012     * 
013     * @author whoschek@lbl.gov
014     * @author $Author: hoschek3 $
015     * @version $Revision: 1.1 $, $Date: 2004/07/22 01:31:04 $
016     */
017    public interface ExceptionHandler {
018            
019            /**
020             * Called if a {@link RuntimeException} is raised within
021             * {@link EventHandler#handle(Object)} of the given source stage.
022             * 
023             * @param cause
024             *            the causing exception
025             * @param causingEvent
026             *            the event that caused the exception.
027             * @param source
028             *            the stage that could not properly handle the causing event.
029             */     
030            public void onException(RuntimeException cause, Object causingEvent, Stage source);
031            
032    }