Class SMTPTransport.Authenticator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean enabled  
      private java.lang.String mech  
      protected int resp  
    • Constructor Summary

      Constructors 
      Constructor Description
      Authenticator​(java.lang.String mech)  
      Authenticator​(java.lang.String mech, boolean enabled)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean authenticate​(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd)
      Start the authentication handshake by issuing the AUTH command.
      (package private) abstract void doAuth​(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd)  
      (package private) boolean enabled()  
      (package private) java.lang.String getInitialResponse​(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd)
      Provide the initial response to use in the AUTH command, or null if not supported.
      (package private) java.lang.String getMechanism()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • resp

        protected int resp
      • mech

        private final java.lang.String mech
      • enabled

        private final boolean enabled
    • Constructor Detail

      • Authenticator

        Authenticator​(java.lang.String mech)
      • Authenticator

        Authenticator​(java.lang.String mech,
                      boolean enabled)
    • Method Detail

      • getMechanism

        java.lang.String getMechanism()
      • enabled

        boolean enabled()
      • authenticate

        boolean authenticate​(java.lang.String host,
                             java.lang.String authzid,
                             java.lang.String user,
                             java.lang.String passwd)
                      throws MessagingException
        Start the authentication handshake by issuing the AUTH command. Delegate to the doAuth method to do the mechanism-specific part of the handshake.
        Throws:
        MessagingException
      • getInitialResponse

        java.lang.String getInitialResponse​(java.lang.String host,
                                            java.lang.String authzid,
                                            java.lang.String user,
                                            java.lang.String passwd)
                                     throws MessagingException,
                                            java.io.IOException
        Provide the initial response to use in the AUTH command, or null if not supported. Subclasses that support the initial response capability will override this method.
        Throws:
        MessagingException
        java.io.IOException
      • doAuth

        abstract void doAuth​(java.lang.String host,
                             java.lang.String authzid,
                             java.lang.String user,
                             java.lang.String passwd)
                      throws MessagingException,
                             java.io.IOException
        Throws:
        MessagingException
        java.io.IOException