Class Message
java.lang.Object
com.swiftmq.impl.streams.comp.message.Message
- Direct Known Subclasses:
BytesMessage
,MapMessage
,ObjectMessage
,StreamMessage
,TextMessage
Facade to wrap a javax.jms.Message.
- Author:
- IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
-
Method Summary
Modifier and TypeMethodDescriptionClears the message body.copyProperties
(Message source) Internal use only.Returns the JMS correlation ID.Sets the JMS correlation ID.Returns the Name of the JMSDestination.long
Returns the JMS expiration.expiration
(long exp) Sets the JMS expirationMessageImpl
getImpl()
Internal use only.boolean
Returns true if this Message is non-persistent.boolean
Internal use.boolean
Returns true if this Message is persistent.boolean
isSelected
(MessageSelector selector) Internal use only.Returns the JMS message ID.Sets the JMS message ID.Marks this Message as non-persistent.onMessageEnabled
(boolean onMessageEnabled) Can be set to false in an Input callback to disable calling the onMessage Callback with this Message.Marks this Message as persistent.int
priority()
Returns the JMS prioritypriority
(int prio) Sets the JMS priority.Returns a PropertySet that contains all Message Properties of this MessageReturns the Message property with that name.Destination
replyTo()
Returns the replyTo addressreplyTo
(Destination destination) Sets the replyTo addresslong
size()
Returns the size (bytes) of the Message.long
Returns the JMS timestamp.timestamp
(long timestamp) Sets the JMS timestamptoString()
type()
return the type of this Message
-
Method Details
-
getImpl
public MessageImpl getImpl()Internal use only. -
copyProperties
Internal use only.- Throws:
JMSException
-
isSelected
public boolean isSelected(MessageSelector selector) throws JMSException Internal use only.- Throws:
JMSException
-
type
return the type of this Message- Returns:
- "message"
-
persistent
Marks this Message as persistent.- Returns:
- Message
- Throws:
JMSException
-
isPersistent
public boolean isPersistent() throws JMSExceptionReturns true if this Message is persistent.- Returns:
- true/false
- Throws:
JMSException
-
nonpersistent
Marks this Message as non-persistent.- Returns:
- Message
- Throws:
JMSException
-
isNonpersistent
public boolean isNonpersistent() throws JMSExceptionReturns true if this Message is non-persistent.- Returns:
- true/false
- Throws:
JMSException
-
destination
Returns the Name of the JMSDestination.- Returns:
- Name of the JMSDestination
- Throws:
JMSException
-
size
public long size()Returns the size (bytes) of the Message.- Returns:
- size
-
messageId
Sets the JMS message ID.- Parameters:
s
- message id- Returns:
- Message
- Throws:
JMSException
-
messageId
Returns the JMS message ID.- Returns:
- message id
- Throws:
JMSException
-
correlationId
Sets the JMS correlation ID.- Parameters:
s
- correlation id- Returns:
- Message
- Throws:
JMSException
-
correlationId
Returns the JMS correlation ID.- Returns:
- correlation id
- Throws:
JMSException
-
priority
Sets the JMS priority.- Parameters:
prio
- priority- Returns:
- Message
- Throws:
JMSException
-
priority
public int priority() throws JMSExceptionReturns the JMS priority- Returns:
- priority
- Throws:
JMSException
-
expiration
Sets the JMS expiration- Parameters:
exp
- expiration- Returns:
- Message
- Throws:
JMSException
-
expiration
public long expiration() throws JMSExceptionReturns the JMS expiration.- Returns:
- expiration
- Throws:
JMSException
-
timestamp
Sets the JMS timestamp- Parameters:
timestamp
- time stamp- Returns:
- Message
- Throws:
JMSException
-
timestamp
public long timestamp() throws JMSExceptionReturns the JMS timestamp.- Returns:
- timestamp
- Throws:
JMSException
-
replyTo
Sets the replyTo address- Parameters:
destination
-- Returns:
- Message
- Throws:
JMSException
-
replyTo
public Destination replyTo() throws JMSExceptionReturns the replyTo address- Returns:
- replyTo Address
- Throws:
JMSException
-
property
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
Clears the message body.- Returns:
- this
-
properties
Returns a PropertySet that contains all Message Properties of this Message- Returns:
- PropertySet
- Throws:
Exception
-
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
-