Class MailAttachment

java.lang.Object
io.vertx.mutiny.ext.mail.MailAttachment
All Implemented Interfaces:
MutinyDelegate

public class MailAttachment extends Object implements MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
See Also:
  • MailAttachment
  • Field Details

  • Constructor Details

    • MailAttachment

      public MailAttachment(io.vertx.ext.mail.MailAttachment delegate)
      Create a new instance of MailAttachment delegating to the given (non-null) instance of MailAttachment.
    • MailAttachment

      public MailAttachment(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.mail.MailAttachment getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • create

      public static MailAttachment create()
      construct an empty MailAttachment object that can be filled with the setters
    • create

      public static MailAttachment create(io.vertx.core.json.JsonObject json)
      create a MailAttachment object from a JsonObject representation
      Parameters:
      json - object to be copied
    • create

      public static MailAttachment create(MailAttachment other)
      create a copy of a MailAttachment object
      Parameters:
      other - object to be copied
    • getData

      public io.vertx.core.buffer.Buffer getData()
      get the data
      Returns:
      the data
    • setData

      public MailAttachment setData(io.vertx.core.buffer.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<io.vertx.core.buffer.Buffer> getStream()
      Gets the data stream.
      Returns:
      the data stream
    • setStream

      public MailAttachment setStream(ReadStream<io.vertx.core.buffer.Buffer> stream)
      Sets the data stream.
      Parameters:
      stream - data stream to be used at attachment
      Returns:
      this to be able to use it fluently
    • setStream

      public MailAttachment setStream(Flow.Publisher<io.vertx.core.buffer.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 key
      value - the header value
      Returns:
      a reference to this, so the API can be used fluently
    • getHeaders

      public io.vertx.core.MultiMap getHeaders()
      Get the headers to be added for this attachment.
      Returns:
      the headers
    • setHeaders

      public MailAttachment setHeaders(io.vertx.core.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 io.vertx.core.json.JsonObject toJson()
      convert this object to JSON representation
      Returns:
      the JSON object
    • newInstance

      public static MailAttachment newInstance(io.vertx.ext.mail.MailAttachment delegate)
      Creates a new instance of the MailAttachment.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object