Class SmtpCommand


  • public class SmtpCommand
    extends java.lang.Object
    List of SMTP commands.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SmtpCommand.Type
      Represents the SMTP command types.
    • Constructor Summary

      Constructors 
      Constructor Description
      SmtpCommand​(SmtpCommand.Type type, java.lang.String param)
      Creates a new SmtpCommand.
    • Constructor Detail

      • SmtpCommand

        public SmtpCommand​(SmtpCommand.Type type,
                           java.lang.String param)
        Creates a new SmtpCommand.
        Parameters:
        type - The command type.
        param - The parameter.
    • Method Detail

      • getType

        public SmtpCommand.Type getType()
        Returns the command's type.
        Returns:
        The command's type.
      • getParameter

        public java.lang.String getParameter()
        Returns the command's parameter.
        Returns:
        The command's parameter.
      • parse

        public static SmtpCommand parse​(java.lang.String line)
        Parses the line and creates a new SmtpCommand. If line is null, this method directly returns null. In all other cases, a new SmtpCommand will be returned.
        Parameters:
        line - The SMTP line.
        Returns:
        A new SmtpCommand or null.