public interface JMSFormatter
Modifier and Type | Method and Description |
---|---|
byte[] |
fromJMSMessage(javax.jms.Session session,
javax.jms.Message message)
Format a JMS message to send to a non-JMS application.
|
javax.jms.Message |
toJMSMessage(javax.jms.Session session,
byte[] buffer)
Create a
Message from the bytes received from the Broker. |
byte[] fromJMSMessage(javax.jms.Session session, javax.jms.Message message) throws javax.jms.JMSException
Message
and its subclasses to access the content of the
message.session
- the session used to send the message.message
- the Message
to send to a non-JMS client.null
or an empty byte array.javax.jms.JMSException
- if the message is not created properly. Wrap all
Throwable
objects into JMSExceptions and
re-throw them.javax.jms.Message toJMSMessage(javax.jms.Session session, byte[] buffer) throws javax.jms.JMSException
Message
from the bytes received from the Broker.
Use the createMessageXxx
methods of the session
and the methods of Message
and its subclasses to create the
message.session
- the session which received the byte array.buffer
- the bytes received from the broker.Message
, created in the session
.javax.jms.JMSException
- if the message is not created properly. Wrap all
Throwable
objects into JMSExceptions and
re-throw them.