Class Transaction
java.lang.Object
com.mimecast.robin.smtp.transaction.Transaction
- All Implemented Interfaces:
Serializable
Transaction.
This provides a container for SMTP transaction details.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringRecords the SMTP command of this transaction.private booleanRecords the SMTP response is in error.private static final org.apache.logging.log4j.Loggerprivate StringRecords the SMTP command payload if any.private StringRecords the SMTP response if any.private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the SMTP command address if any.Gets the SMTP command of this transaction.Gets the SMTP command payload.Gets the SMTP command response.Gets the SMTP command response code (first three characters).Gets the SMTP command response as a single line string.booleanisError()Is the SMTP command in error.setError(boolean error) Sets the SMTP command error.setPayload(String payload) Sets the SMTP command payload.setResponse(String response) Sets the SMTP command response.toString()Transactions as string.
-
Field Details
-
log
private static final org.apache.logging.log4j.Logger log -
serialVersionUID
private static final long serialVersionUID- See Also:
-
command
Records the SMTP command of this transaction. -
payload
Records the SMTP command payload if any. -
response
Records the SMTP response if any. -
error
private boolean errorRecords the SMTP response is in error.
-
-
Constructor Details
-
Transaction
Constructor.- Parameters:
command- Command string.
-
-
Method Details
-
getCommand
Gets the SMTP command of this transaction.- Returns:
- Command string.
-
setPayload
Sets the SMTP command payload.- Parameters:
payload- Payload string.- Returns:
- Self.
-
getPayload
Gets the SMTP command payload.- Returns:
- Payload string.
-
getAddress
Gets the SMTP command address if any.- Returns:
- Payload string.
-
setResponse
Sets the SMTP command response.- Parameters:
response- Response string.- Returns:
- Self.
-
getResponse
Gets the SMTP command response.- Returns:
- Response string.
-
getResponseCode
Gets the SMTP command response code (first three characters).Returns 102 if response length too short.
- Returns:
- Response code string.
-
getResponseString
Gets the SMTP command response as a single line string.- Returns:
- Response string.
-
setError
Sets the SMTP command error.- Parameters:
error- Error enablement.- Returns:
- Self
-
isError
public boolean isError()Is the SMTP command in error.- Returns:
- Is error boolean.
-
toString
Transactions as string.
-