Module org.shredzone.acme4j.smime
Package org.shredzone.acme4j.smime.email
Interface ResponseBodyGenerator
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ResponseBodyGenerator
A generator for the response body to be set to theMessage
.This generator can be used to design the body of the outgoing response email. However, note that the response email is evaluated by a machine and usually not read by humans, so the design should be kept simple, and must be conformous to RFC-8823.
The
responseBody
must be a part of the response email body, otherwise the validation will fail.A minimal implementation is:
response.setContent(responseBody, RESPONSE_BODY_TYPE);
- Since:
- 2.12
- See Also:
- RFC 8823
-
-
Field Summary
Fields Modifier and Type Field Description static String
RESPONSE_BODY_TYPE
The content-type of the response body: "text/plain"
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setContent(jakarta.mail.Message response, String responseBody)
Sets the content of theMessage
.
-
-
-
Field Detail
-
RESPONSE_BODY_TYPE
static final String RESPONSE_BODY_TYPE
The content-type of the response body: "text/plain"- See Also:
- Constant Field Values
-
-
Method Detail
-
setContent
void setContent(jakarta.mail.Message response, String responseBody) throws jakarta.mail.MessagingException
Sets the content of theMessage
.- Parameters:
response
-Message
to set the body content.responseBody
- The response body that must be part of the email response, and must use "text/plain" content type.- Throws:
jakarta.mail.MessagingException
-
-