dk.netarkivet.common.utils
Class Notifications

java.lang.Object
  extended by dk.netarkivet.common.utils.Notifications
Direct Known Subclasses:
EMailNotifications, PrintNotifications

public abstract class Notifications
extends java.lang.Object

This class encapsulates reacting to a serious error or warning message.


Constructor Summary
Notifications()
           
 
Method Summary
 void notify(java.lang.String message, NotificationType eventType)
          Notify about an event.
abstract  void notify(java.lang.String message, NotificationType eventType, java.lang.Throwable e)
          Notifies about an event including an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Notifications

public Notifications()
Method Detail

notify

public void notify(java.lang.String message,
                   NotificationType eventType)
Notify about an event. This is the same as calling notify(String, NotificationType, Throwable) with null as the second parameter.

Parameters:
message - The error message to notify about.

notify

public abstract void notify(java.lang.String message,
                            NotificationType eventType,
                            java.lang.Throwable e)
Notifies about an event including an exception.

Parameters:
message - The message to notify about.
eventType - The type of event
e - An exception related to the event, if not the event itself May be null for no exception.