receiveMail

void receiveMail(EnclaveMail mail, String routingHint)

Invoked when a mail has been delivered by the host (via EnclaveHost.deliverMail), successfully decrypted and authenticated (so the EnclaveMail.authenticatedSender property is reliable).

Default implementation throws UnsupportedOperationException so you should not perform a supercall.

Any uncaught exceptions thrown by this method propagate to the calling EnclaveHost.deliverMail. In Java, checked exceptions can be made to propagate by rethrowing them in an unchecked one.

Parameters

mail

Access to the decrypted/authenticated mail body+envelope.

routingHint

An optional string provided by the host that can be passed to postMail to tell the host that you wish to reply to whoever provided it with this mail (e.g. connection ID). Note that this may not be the same as the logical sender of the mail if advanced anonymity techniques are being used, like users passing mail around between themselves before it's delivered.