Class Message

java.lang.Object
com.swiftmq.impl.streams.comp.message.Message
Direct Known Subclasses:
BytesMessage, MapMessage, ObjectMessage, StreamMessage, TextMessage

public class Message extends Object
Facade to wrap a javax.jms.Message.
Author:
IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
  • Method Details

    • getImpl

      public MessageImpl getImpl()
      Internal use only.
    • copyProperties

      public Message copyProperties(Message source) throws JMSException
      Internal use only.
      Throws:
      JMSException
    • isSelected

      public boolean isSelected(MessageSelector selector) throws JMSException
      Internal use only.
      Throws:
      JMSException
    • type

      public String type()
      return the type of this Message
      Returns:
      "message"
    • persistent

      public Message persistent() throws JMSException
      Marks this Message as persistent.
      Returns:
      Message
    • isPersistent

      public boolean isPersistent() throws JMSException
      Returns true if this Message is persistent.
      Returns:
      true/false
    • nonpersistent

      public Message nonpersistent() throws JMSException
      Marks this Message as non-persistent.
      Returns:
      Message
    • isNonpersistent

      public boolean isNonpersistent() throws JMSException
      Returns true if this Message is non-persistent.
      Returns:
      true/false
    • destination

      public String destination() throws JMSException
      Returns the Name of the JMSDestination.
      Returns:
      Name of the JMSDestination
    • size

      public long size()
      Returns the size (bytes) of the Message.
      Returns:
      size
    • messageId

      public Message messageId(String s) throws JMSException
      Sets the JMS message ID.
      Parameters:
      s - message id
      Returns:
      Message
    • messageId

      public String messageId() throws JMSException
      Returns the JMS message ID.
      Returns:
      message id
    • correlationId

      public Message correlationId(String s) throws JMSException
      Sets the JMS correlation ID.
      Parameters:
      s - correlation id
      Returns:
      Message
    • correlationId

      public String correlationId() throws JMSException
      Returns the JMS correlation ID.
      Returns:
      correlation id
    • priority

      public Message priority(int prio) throws JMSException
      Sets the JMS priority.
      Parameters:
      prio - priority
      Returns:
      Message
    • priority

      public int priority() throws JMSException
      Returns the JMS priority
      Returns:
      priority
    • expiration

      public Message expiration(long exp) throws JMSException
      Sets the JMS expiration
      Parameters:
      exp - expiration
      Returns:
      Message
    • expiration

      public long expiration() throws JMSException
      Returns the JMS expiration.
      Returns:
      expiration
    • timestamp

      public Message timestamp(long timestamp) throws JMSException
      Sets the JMS timestamp
      Parameters:
      timestamp - time stamp
      Returns:
      Message
    • timestamp

      public long timestamp() throws JMSException
      Returns the JMS timestamp.
      Returns:
      timestamp
    • replyTo

      public Message replyTo(Destination destination) throws JMSException
      Sets the replyTo address
      Parameters:
      destination -
      Returns:
      Message
    • replyTo

      public Destination replyTo() throws JMSException
      Returns the replyTo address
      Returns:
      replyTo Address
    • property

      public Property property(String name)
      Returns the Message property with that name. If the property does not exists in the message, the value of the returned property is set to null.
      Parameters:
      name - Property name
      Returns:
      Property
    • clearBody

      public Message clearBody()
      Clears the message body.
      Returns:
      this
    • properties

      public PropertySet properties() throws Exception
      Returns a PropertySet that contains all Message Properties of this Message
      Returns:
      PropertySet
      Throws:
      Exception
    • onMessageEnabled

      public Message onMessageEnabled(boolean onMessageEnabled)
      Can be set to false in an Input callback to disable calling the onMessage Callback with this Message.
      Parameters:
      onMessageEnabled - true/false
      Returns:
      this
    • isOnMessageEnabled

      public boolean isOnMessageEnabled()
      Internal use.
    • toString

      public String toString()
      Overrides:
      toString in class Object