Package mireka.smtp
Class EnhancedStatus
- Object
-
- mireka.smtp.EnhancedStatus
-
- All Implemented Interfaces:
MailSystemStatus
public class EnhancedStatus extends Object implements MailSystemStatus
These class represents an SMTP status which includes enhanced status code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEnhancedStatus.StatusClass
-
Field Summary
Fields Modifier and Type Field Description static EnhancedStatusBAD_DESTINATION_MAILBOX_ADDRESS_SYNTAXstatic EnhancedStatusBAD_DESTINATION_SYSTEM_ADDRESSstatic EnhancedStatusBAD_MESSAGE_BODYstatic EnhancedStatusINCORRECT_CONFIGURATIONstatic EnhancedStatusMAIL_SYSTEM_FULLstatic EnhancedStatusPERMANENT_INTERNAL_ERRORstatic EnhancedStatusPERMANENT_UNABLE_TO_ROUTEstatic EnhancedStatusTRANSIENT_DIRECTORY_SERVER_FAILUREstatic EnhancedStatusTRANSIENT_LOCAL_ERROR_IN_PROCESSINGstatic EnhancedStatusTRANSIENT_SYSTEM_NOT_ACCEPTING_NETWORK_MESSAGES
-
Constructor Summary
Constructors Constructor Description EnhancedStatus(int smtpReplyCode, String enhancedStatusCode, String message)EnhancedStatus(Rfc821Status response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetDiagnosticCode()Returns the original response without any parsing, for example old SMTP and new enhanced codes are included on every line (if they were present).StringgetEnhancedStatusCode()StringgetMessage()Returns the extracted text message, SMTP and enhanced status codes are removed.StringgetMessagePrefixedWithEnhancedStatusCode()intgetSmtpReplyCode()returns the original 3 digit reply codes, compatible with the original SMTP RFC.inthashCode()booleanshouldRetry()it returns true, if repeating the action may helpStringtoString()
-
-
-
Field Detail
-
TRANSIENT_SYSTEM_NOT_ACCEPTING_NETWORK_MESSAGES
public static final EnhancedStatus TRANSIENT_SYSTEM_NOT_ACCEPTING_NETWORK_MESSAGES
-
TRANSIENT_DIRECTORY_SERVER_FAILURE
public static final EnhancedStatus TRANSIENT_DIRECTORY_SERVER_FAILURE
-
BAD_DESTINATION_SYSTEM_ADDRESS
public static final EnhancedStatus BAD_DESTINATION_SYSTEM_ADDRESS
-
PERMANENT_UNABLE_TO_ROUTE
public static final EnhancedStatus PERMANENT_UNABLE_TO_ROUTE
-
TRANSIENT_LOCAL_ERROR_IN_PROCESSING
public static final EnhancedStatus TRANSIENT_LOCAL_ERROR_IN_PROCESSING
-
MAIL_SYSTEM_FULL
public static final EnhancedStatus MAIL_SYSTEM_FULL
-
BAD_DESTINATION_MAILBOX_ADDRESS_SYNTAX
public static final EnhancedStatus BAD_DESTINATION_MAILBOX_ADDRESS_SYNTAX
-
PERMANENT_INTERNAL_ERROR
public static final EnhancedStatus PERMANENT_INTERNAL_ERROR
-
BAD_MESSAGE_BODY
public static final EnhancedStatus BAD_MESSAGE_BODY
-
INCORRECT_CONFIGURATION
public static final EnhancedStatus INCORRECT_CONFIGURATION
-
-
Constructor Detail
-
EnhancedStatus
public EnhancedStatus(int smtpReplyCode, String enhancedStatusCode, String message)
-
EnhancedStatus
public EnhancedStatus(Rfc821Status response)
-
-
Method Detail
-
getSmtpReplyCode
public int getSmtpReplyCode()
Description copied from interface:MailSystemStatusreturns the original 3 digit reply codes, compatible with the original SMTP RFC.- Specified by:
getSmtpReplyCodein interfaceMailSystemStatus- See Also:
- rfc5321 - 4.2. SMTP Replies
-
getEnhancedStatusCode
public String getEnhancedStatusCode()
-
getMessage
public String getMessage()
Description copied from interface:MailSystemStatusReturns the extracted text message, SMTP and enhanced status codes are removed. The result may consists of one or more lines.- Specified by:
getMessagein interfaceMailSystemStatus
-
shouldRetry
public boolean shouldRetry()
it returns true, if repeating the action may help
-
getMessagePrefixedWithEnhancedStatusCode
public String getMessagePrefixedWithEnhancedStatusCode()
-
getDiagnosticCode
public String getDiagnosticCode()
Description copied from interface:MailSystemStatusReturns the original response without any parsing, for example old SMTP and new enhanced codes are included on every line (if they were present).
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObject
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classObject
-
toString
public String toString()
- Overrides:
toStringin classObject
-
-