public class MapAttachmentResourceHandler extends Object implements JavaMailAttachmentResourceHandler
Constructor and Description |
---|
MapAttachmentResourceHandler()
Initialize an empty mapping
|
Modifier and Type | Method and Description |
---|---|
void |
registerResourceHandler(Class<? extends NamedResource> clazz,
JavaMailAttachmentResourceHandler handler)
Register a new attachment resource handler.
|
void |
setData(javax.mail.BodyPart part,
NamedResource resource,
Attachment attachment)
Add the attachment to the email.
|
public MapAttachmentResourceHandler()
public void setData(javax.mail.BodyPart part, NamedResource resource, Attachment attachment) throws AttachmentResourceHandlerException
JavaMailAttachmentResourceHandler
setData
in interface JavaMailAttachmentResourceHandler
part
- the part to attach toresource
- the resource that contains the attachment bytesattachment
- the attachment informationAttachmentResourceHandlerException
- when attachment couldn't be added to the emailpublic void registerResourceHandler(Class<? extends NamedResource> clazz, JavaMailAttachmentResourceHandler handler)
clazz
- the class of the attachment resourcehandler
- the attachment resource handlerCopyright © 2021. All rights reserved.