infoservice.mailsystem.central
Class MailHandler

java.lang.Object
  extended by infoservice.mailsystem.central.MailHandler

public class MailHandler
extends java.lang.Object

This class handles the received mails.


Field Summary
private  javax.mail.internet.MimeMessage m_receivedMessage
          Stores the received message.
 
Constructor Summary
MailHandler(java.io.InputStream a_receivedMail)
          Creates a new MailHandler.
 
Method Summary
 void createReply()
          This creates the reply for the received message, depending on the subject and message data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_receivedMessage

private javax.mail.internet.MimeMessage m_receivedMessage
Stores the received message.

Constructor Detail

MailHandler

public MailHandler(java.io.InputStream a_receivedMail)
            throws javax.mail.MessagingException
Creates a new MailHandler. The message is read and parsed from the specified InputStream. If the data of the InputStream is not a valid mail message, a MessagingException is thrown.

Parameters:
a_receivedMail - An InputStream, which contains the data of a received e-mail.
Throws:
javax.mail.MessagingException
Method Detail

createReply

public void createReply()
                 throws java.lang.Exception
This creates the reply for the received message, depending on the subject and message data. The reply is sent back to the sender. If there occurs an error while replying to the message, an Exception is thrown.

Throws:
java.lang.Exception