Package io.vertx.rxjava3.ext.mail
Class MailAttachment
- java.lang.Object
-
- io.vertx.rxjava3.ext.mail.MailAttachment
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<MailAttachment>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description MailAttachment(MailAttachment delegate)
MailAttachment(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MailAttachment
addHeader(String key, String value)
Add an header to this attachment.static MailAttachment
create()
construct an empty MailAttachment object that can be filled with the settersstatic MailAttachment
create(JsonObject json)
create a MailAttachment object from a JsonObject representationstatic MailAttachment
create(MailAttachment other)
create a copy of a MailAttachment objectboolean
equals(Object o)
String
getContentId()
get the Content-ID fieldString
getContentType()
get the Content-TypeBuffer
getData()
get the dataMailAttachment
getDelegate()
String
getDescription()
get the description fieldString
getDisposition()
get the disposition fieldMultiMap
getHeaders()
Get the headers to be added for this attachment.String
getName()
get the nameint
getSize()
Gets the size of the attachment.ReadStream<Buffer>
getStream()
Gets the data stream.int
hashCode()
static MailAttachment
newInstance(MailAttachment arg)
MailAttachment
setContentId(String contentId)
set the Content-ID field to be used in the attachmentMailAttachment
setContentType(String contentType)
set the Content-TypeMailAttachment
setData(Buffer data)
set the dataMailAttachment
setDescription(String description)
set the description field to be used in the attachmentMailAttachment
setDisposition(String disposition)
set the disposition field to be used in the attachmentMailAttachment
setHeaders(MultiMap headers)
Set the headers to be added for this attachment.MailAttachment
setName(String name)
set the nameMailAttachment
setSize(int size)
Sets the size of the attachment.MailAttachment
setStream(Flowable<Buffer> stream)
Sets the data stream.JsonObject
toJson()
convert this object to JSON representationString
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<MailAttachment> __TYPE_ARG
-
-
Constructor Detail
-
MailAttachment
public MailAttachment(MailAttachment delegate)
-
MailAttachment
public MailAttachment(Object delegate)
-
-
Method Detail
-
getDelegate
public MailAttachment getDelegate()
-
create
public static MailAttachment create()
construct an empty MailAttachment object that can be filled with the setters- Returns:
-
create
public static MailAttachment create(JsonObject json)
create a MailAttachment object from a JsonObject representation- Parameters:
json
- object to be copied- Returns:
-
create
public static MailAttachment create(MailAttachment other)
create a copy of a MailAttachment object- Parameters:
other
- object to be copied- Returns:
-
getData
public Buffer getData()
get the data- Returns:
- the data
-
setData
public MailAttachment setData(Buffer data)
set the data- Parameters:
data
- Buffer of bytes to be used at attachment- Returns:
- this to be able to use it fluently
-
getStream
public ReadStream<Buffer> getStream()
Gets the data stream.- Returns:
- the data stream
-
setStream
public MailAttachment setStream(Flowable<Buffer> stream)
Sets the data stream.- Parameters:
stream
- data stream to be used at attachment- Returns:
- this to be able to use it fluently
-
getSize
public int getSize()
Gets the size of the attachment.- Returns:
- the size of the attachment
-
setSize
public MailAttachment setSize(int size)
Sets the size of the attachment.It is needed when using ReadStream for the MailAttachement.
- Parameters:
size
- the size of the attachment- Returns:
- this to be able to use it fluently
-
getName
public String getName()
get the name- Returns:
- the name
-
setName
public MailAttachment setName(String name)
set the name- Parameters:
name
- name of the attachment file- Returns:
- this to be able to use it fluently
name is the descriptive filename that will be put into the mail i.e. usually a local filename without path this can be set to "" to omit the filename attribute
-
getContentType
public String getContentType()
get the Content-Type- Returns:
- the contentType
-
setContentType
public MailAttachment setContentType(String contentType)
set the Content-Type- Parameters:
contentType
- the contentType- Returns:
- this to be able to use it fluently
-
getDisposition
public String getDisposition()
get the disposition field- Returns:
- the disposition
-
setDisposition
public MailAttachment setDisposition(String disposition)
set the disposition field to be used in the attachment- Parameters:
disposition
- the disposition- Returns:
- this to be able to use it fluently
-
getDescription
public String getDescription()
get the description field- Returns:
- the description
-
setDescription
public MailAttachment setDescription(String description)
set the description field to be used in the attachment- Parameters:
description
- the description- Returns:
- this to be able to use it fluently
-
getContentId
public String getContentId()
get the Content-ID field- Returns:
- the content id
-
setContentId
public MailAttachment setContentId(String contentId)
set the Content-ID field to be used in the attachment- Parameters:
contentId
- the content id- Returns:
- this to be able to use it fluently
-
addHeader
public MailAttachment addHeader(String key, String value)
Add an header to this attachment.- Parameters:
key
- the header keyvalue
- the header value- Returns:
- a reference to this, so the API can be used fluently
-
getHeaders
public MultiMap getHeaders()
Get the headers to be added for this attachment.- Returns:
- the headers
-
setHeaders
public MailAttachment setHeaders(MultiMap headers)
Set the headers to be added for this attachment.- Parameters:
headers
- the headers to be added- Returns:
- this to be able to use it fluently
-
toJson
public JsonObject toJson()
convert this object to JSON representation- Returns:
- the JSON object
-
newInstance
public static MailAttachment newInstance(MailAttachment arg)
-
-