Class ActiveMQBlobMessage

All Implemented Interfaces:
jakarta.jms.Message, BlobMessage, MessageReference, Command, DataStructure, MarshallAware, Message, ScheduledMessage

public class ActiveMQBlobMessage extends ActiveMQMessage implements BlobMessage
An implementation of BlobMessage for out of band BLOB transfer
  • Field Details

  • Constructor Details

    • ActiveMQBlobMessage

      public ActiveMQBlobMessage()
  • Method Details

    • copy

      public Message copy()
      Overrides:
      copy in class ActiveMQMessage
    • getDataStructureType

      public byte getDataStructureType()
      Specified by:
      getDataStructureType in interface DataStructure
      Overrides:
      getDataStructureType in class ActiveMQMessage
      Returns:
      The type of the data structure
    • getRemoteBlobUrl

      public String getRemoteBlobUrl()
    • setRemoteBlobUrl

      public void setRemoteBlobUrl(String remoteBlobUrl)
    • getMimeType

      public String getMimeType()
      The MIME type of the BLOB which can be used to apply different content types to messages.
      Specified by:
      getMimeType in interface BlobMessage
    • setMimeType

      public void setMimeType(String mimeType)
      Description copied from interface: BlobMessage
      Sets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework DataHandler
      Specified by:
      setMimeType in interface BlobMessage
    • getName

      public String getName()
      Specified by:
      getName in interface BlobMessage
    • setName

      public void setName(String name)
      The name of the attachment which can be useful information if transmitting files over ActiveMQ
      Specified by:
      setName in interface BlobMessage
    • isDeletedByBroker

      public boolean isDeletedByBroker()
    • setDeletedByBroker

      public void setDeletedByBroker(boolean deletedByBroker)
    • getJMSXMimeType

      public String getJMSXMimeType()
      Description copied from interface: Message
      Returns the MIME type of this mesage. This can be used in selectors to filter on the MIME types of the different JMS messages, or in the case of BlobMessage it allows you to create a selector on the MIME type of the BLOB body
      Specified by:
      getJMSXMimeType in interface Message
      Overrides:
      getJMSXMimeType in class ActiveMQMessage
    • getInputStream

      public InputStream getInputStream() throws IOException, jakarta.jms.JMSException
      Description copied from interface: BlobMessage
      Return the input stream to process the BLOB
      Specified by:
      getInputStream in interface BlobMessage
      Throws:
      IOException
      jakarta.jms.JMSException
    • getURL

      public URL getURL() throws jakarta.jms.JMSException
      Description copied from interface: BlobMessage
      Returns the URL for the blob if its available as an external URL (such as file, http, ftp etc) or null if there is no URL available
      Specified by:
      getURL in interface BlobMessage
      Throws:
      jakarta.jms.JMSException
    • setURL

      public void setURL(URL url)
    • getBlobUploader

      public BlobUploader getBlobUploader()
    • setBlobUploader

      public void setBlobUploader(BlobUploader blobUploader)
    • getBlobDownloader

      public BlobDownloader getBlobDownloader()
    • setBlobDownloader

      public void setBlobDownloader(BlobDownloader blobDownloader)
    • onSend

      public void onSend() throws jakarta.jms.JMSException
      Description copied from class: ActiveMQMessage
      Send operation event listener. Used to get the message ready to be sent.
      Overrides:
      onSend in class ActiveMQMessage
      Throws:
      jakarta.jms.JMSException
    • deleteFile

      public void deleteFile() throws IOException, jakarta.jms.JMSException
      Throws:
      IOException
      jakarta.jms.JMSException