private static final class MailHandler.DefaultAuthenticator extends Authenticator
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
pass
The password to use.
|
Modifier | Constructor and Description |
---|---|
private |
DefaultAuthenticator(java.lang.String pass)
Use the factory method instead of this constructor.
|
Modifier and Type | Method and Description |
---|---|
protected PasswordAuthentication |
getPasswordAuthentication()
Called when password authentication is needed.
|
(package private) static Authenticator |
of(java.lang.String pass)
Creates an Authenticator for the given password.
|
getDefaultUserName, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingSite
private DefaultAuthenticator(java.lang.String pass)
pass
- the password.static Authenticator of(java.lang.String pass)
pass
- the password.protected final PasswordAuthentication getPasswordAuthentication()
Authenticator
Note that if this method uses a dialog to prompt the user for this information, the dialog needs to block until the user supplies the information. This method can not simply return after showing the dialog.
getPasswordAuthentication
in class Authenticator