org.objectweb.jonas.mail.lib
Class JAuthenticator

java.lang.Object
  extended by javax.mail.Authenticator
      extended by org.objectweb.jonas.mail.lib.JAuthenticator

public class JAuthenticator
extends javax.mail.Authenticator

This class specifies the authenticator to used in Sesssion.getInstance() method.

Author:
Florent Benoit, Ludovic Bert

Constructor Summary
JAuthenticator(java.lang.String username, java.lang.String password)
          Constructor for build a new Authenticator
 
Method Summary
 javax.mail.PasswordAuthentication getPasswordAuthentication()
          Called when password authentication is needed.
 
Methods inherited from class javax.mail.Authenticator
getDefaultUserName, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingSite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAuthenticator

public JAuthenticator(java.lang.String username,
                      java.lang.String password)
Constructor for build a new Authenticator

Parameters:
username - the name of the user
password - the password of the user
Method Detail

getPasswordAuthentication

public javax.mail.PasswordAuthentication getPasswordAuthentication()
Called when password authentication is needed.

Overrides:
getPasswordAuthentication in class javax.mail.Authenticator
Returns:
a password authentication