Interface MessageStartState
- All Known Implementing Classes:
SMTPProtocolHandler
This interface is provided to RecipientHandler.startMessage(org.bluezoo.gumdrop.smtp.handler.MessageStartState)
and allows the handler to accept or reject message transfer.
The handler does not need to distinguish between DATA and BDAT transports - this is handled transparently by the connection. Message bytes are written to the pipeline's channel if one was provided.
Methods map to reply codes: acceptMessage → 354,
rejectMessageStorageFull → 452, rejectMessageProcessingError → 451,
rejectMessage → 550.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacceptMessage(MessageDataHandler handler) Ready to receive message content.voidrejectMessage(String message, MailFromHandler handler) Permanently rejects message (550 response).voidTemporarily rejects - processing error (451 response).voidrejectMessageStorageFull(RecipientHandler handler) Temporarily rejects - storage full (452 response).voidServer is shutting down (421 response).
-
Method Details
-
acceptMessage
Ready to receive message content.For DATA, sends 354 response. For BDAT, processing begins immediately. Message bytes are written to the pipeline's channel if one was provided via
MailFromHandler.getPipeline().The handler receives completion notification via
MessageDataHandler.messageComplete(org.bluezoo.gumdrop.smtp.handler.MessageEndState).- Parameters:
handler- receives message completion notification
-
rejectMessageStorageFull
Temporarily rejects - storage full (452 response).- Parameters:
handler- receives next command
-
rejectMessageProcessingError
Temporarily rejects - processing error (451 response).- Parameters:
handler- receives next command
-
rejectMessage
Permanently rejects message (550 response).- Parameters:
message- the rejection messagehandler- receives next transaction
-
serverShuttingDown
void serverShuttingDown()Server is shutting down (421 response).Closes the connection after sending the response.
-