Package ch.astorm.smtp4j.protocol
Class SmtpCommand
- java.lang.Object
-
- ch.astorm.smtp4j.protocol.SmtpCommand
-
public class SmtpCommand extends java.lang.ObjectList of SMTP commands.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSmtpCommand.TypeRepresents the SMTP command types.
-
Constructor Summary
Constructors Constructor Description SmtpCommand(SmtpCommand.Type type, java.lang.String param)Creates a newSmtpCommand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetParameter()Returns the command's parameter.SmtpCommand.TypegetType()Returns the command's type.static SmtpCommandparse(java.lang.String line)Parses thelineand creates a newSmtpCommand.
-
-
-
Constructor Detail
-
SmtpCommand
public SmtpCommand(SmtpCommand.Type type, java.lang.String param)
Creates a newSmtpCommand.- 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 thelineand creates a newSmtpCommand. Iflineis null, this method directly returns null. In all other cases, a newSmtpCommandwill be returned.- Parameters:
line- The SMTP line.- Returns:
- A new
SmtpCommandor null.
-
-