|
|||||||||
| Home >> All >> com >> eireneh >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.eireneh.util
Class Reporter

java.lang.Objectcom.eireneh.util.Reporter
- public class Reporter
- extends java.lang.Object
This package looks after Exceptions and messages as they happen. It would be nice not to need this class - the principle being that any library that encounters an error can throw an exception to indicate that there is a problem. However this is not always the case. For example:
|
Distribution Licence: Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below. The copyright to this program is held by it's authors. |
| Field Summary | |
protected static EventListenerList |
inform_list
The list of listeners |
protected static Logger |
log
The log stream |
| Constructor Summary | |
private |
Reporter()
Enforce Singleton |
| Method Summary | |
static void |
addReporterListener(com.eireneh.util.event.ReporterListener li)
Add an Exception listener to the list of things wanting to know whenever we capture an Exception |
protected static void |
fireCapture(com.eireneh.util.event.ReporterEvent ev)
Log a message |
static void |
informUser(java.lang.Object source,
java.lang.Throwable prob)
Something has gone wrong. |
static void |
informUser(java.lang.String message)
Something has happened. |
static void |
removeReporterListener(com.eireneh.util.event.ReporterListener li)
Remove an Exception listener from the list of things wanting to know whenever we capture an Exception |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
log
protected static Logger log
- The log stream
inform_list
protected static EventListenerList inform_list
- The list of listeners
| Constructor Detail |
Reporter
private Reporter()
- Enforce Singleton
| Method Detail |
informUser
public static void informUser(java.lang.Object source, java.lang.Throwable prob)
- Something has gone wrong. We need to tell the user or someone, but
we can carry on. In general having caught an exception and passed
it to Reporter.informUser(), you should not throw another Exception.
Called to fire a commandEntered event to all the Listeners
informUser
public static void informUser(java.lang.String message)
- Something has happened. We need to tell the user or someone.
Maybe we should have an extra parameter (or even several versions of this method like log*()) that describes the severity of the message. A Sw*ng listener could use this to decide the icon in the OptionPane for example.
addReporterListener
public static void addReporterListener(com.eireneh.util.event.ReporterListener li)
- Add an Exception listener to the list of things wanting
to know whenever we capture an Exception
removeReporterListener
public static void removeReporterListener(com.eireneh.util.event.ReporterListener li)
- Remove an Exception listener from the list of things wanting
to know whenever we capture an Exception
fireCapture
protected static void fireCapture(com.eireneh.util.event.ReporterEvent ev)
- Log a message
|
|||||||||
| Home >> All >> com >> eireneh >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.eireneh.util.Reporter