001package org.avaje.datasource;
002
003/**
004 * Listener for notifications about the DataSource such as when the DataSource
005 * goes down, up or gets close to it's maximum size.
006 * <p>
007 * The intention is to send email notifications to an administrator (or similar)
008 * when these events occur on the DataSource.
009 * </p>
010 */
011public interface DataSourceAlert {
012
013  /**
014   * Send an alert to say the dataSource is back up.
015   */
016  void dataSourceUp(String dataSourceName);
017
018  /**
019   * Send an alert to say the dataSource is down.
020   */
021  void dataSourceDown(String dataSourceName);
022
023  /**
024   * Send an alert to say the dataSource is getting close to its max size.
025   */
026  void dataSourceWarning(String subject, String msg);
027}