001 /* JAPI - (Yet another (hopefully) useful) Java API 002 * 003 * Copyright (C) 2004-2006 Christian Hujer 004 * 005 * This program is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU General Public License as 007 * published by the Free Software Foundation; either version 2 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, but 011 * WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License 016 * along with this program; if not, write to the Free Software 017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 018 * 02111-1307, USA. 019 */ 020 021 package net.sf.japi.util; 022 023 import java.util.EventListener; 024 025 /** Interface that is implemented by classes that handle exceptions via callbacks. 026 * This is useful during operations that can throw more than one exception during an operation. 027 * Even more, when these exceptions eventually are more or less recoverable. 028 * @author <a href="mailto:chris@riedquat.de">Christian Hujer</a> 029 */ 030 public interface ThrowableHandler<T extends Throwable> extends EventListener { 031 032 /** Handle a Throwable. 033 * @param t Throwable to handle 034 */ 035 void handleThrowable(final T t); 036 037 } // interface ThrowableHandler