org.ow2.easybeans.component.mail.factory
Class SimpleAuthenticator

java.lang.Object
  extended by javax.mail.Authenticator
      extended by org.ow2.easybeans.component.mail.factory.SimpleAuthenticator

public class SimpleAuthenticator
extends Authenticator

This class specifies the Authenticator to use in Sesssion.getInstance() method.

Author:
Florent Benoit

Constructor Summary
SimpleAuthenticator(java.lang.String username, java.lang.String password)
          Constructor for build a new Authenticator.
 
Method Summary
 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

SimpleAuthenticator

public SimpleAuthenticator(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 PasswordAuthentication getPasswordAuthentication()
Called when password authentication is needed.

Overrides:
getPasswordAuthentication in class Authenticator
Returns:
a password authentication


Copyright © 2006-2009 OW2 Consortium. All Rights Reserved.