net.sourceforge.jdbdump.connect
Class Mailer

java.lang.Object
  extended by net.sourceforge.jdbdump.connect.Mailer

public class Mailer
extends java.lang.Object

Class handling notification emails.

Mailer is used to send emails informing the user that either a backup file has been created and is ready for downloading, or a database has been completely restored from an uploaded backup.

Necessary data is read from a properties file 'app.properties', which should contain:

Author:
jsuder

Constructor Summary
Mailer()
          Create a new mailer.
 
Method Summary
static void main(java.lang.String[] args)
           
 void sendBackupNotification(java.lang.String backupName)
          Sends a notification message informing about a finished backup.
protected  void sendNotification(java.lang.String backupName, java.lang.String message)
          Sends notification message to the user with specified contents.
 void sendRestoreNotification(java.lang.String backupName)
          Sends a notification message informing about a finished restore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mailer

public Mailer()
Create a new mailer. All necessary information is read from app.properties file.

Method Detail

sendNotification

protected void sendNotification(java.lang.String backupName,
                                java.lang.String message)
Sends notification message to the user with specified contents.

Parameters:
backupName - name of the backup file, which is used to replace all occurences of a '%f' string in the mail contents
name - mail contents

sendBackupNotification

public void sendBackupNotification(java.lang.String backupName)
Sends a notification message informing about a finished backup.

Parameters:
backupName - name of the backup file, which is used to replace all occurences of a '%f' string in the mail contents

sendRestoreNotification

public void sendRestoreNotification(java.lang.String backupName)
Sends a notification message informing about a finished restore.

Parameters:
backupName - name of the backup file, which is used to replace all occurences of a '%f' string in the mail contents

main

public static void main(java.lang.String[] args)


Copyright © 2005-2006 AGH International University of Science and Technology. All Rights Reserved.