org.springframework.jms.core.JmsTemplate , for
convertAndSend and receiveAndConvert operations.
Converts a String to a jakarta., a byte array to a
jakarta., a Map to a jakarta., and
a Serializable object to a jakarta. (or vice versa).
org.springframework.jms.core.JmsTemplate#convertAndSend , org.springframework.jms.core.JmsTemplate#receiveAndConvert
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected BytesMessage | Returns: the resulting messagethe byte array to convert bytes, Session current JMS session session)Create a JMS BytesMessage for the given byte array. |
| protected MapMessage | Returns: the resulting messagethe Map to convert map, Session current JMS session session)Create a JMS MapMessage for the given Map. |
| protected ObjectMessage | Returns: the resulting messagethe Serializable object to convert object, Session current JMS session session)Create a JMS ObjectMessage for the given Serializable object. |
| protected TextMessage | Returns: the resulting messagethe String to convert text, Session current JMS session session)Create a JMS TextMessage for the given String. |
| protected byte[] | Returns: the resulting byte arraythe message to convert message)Extract a byte array from the given |
| protected Map | Returns: the resulting Mapthe message to convert message)Extract a Map from the given |
| protected Serializable | Returns: the resulting Serializable objectthe message to convert message)Extract a Serializable object from the given |
| protected String | Returns: the resulting Stringthe message to convert message)Extract a String from the given TextMessage. |
| public Object | fromMessage(Message
the message to convert message)Implements org. This implementation converts a TextMessage back to a String, a ByteMessage back to a byte array, a MapMessage back to a Map, and an ObjectMessage back to a Serializable object. |
| public Message | toMessage(Object
the object to convert object, Session the Session to use for creating a JMS Message session)Implements org. This implementation creates a TextMessage for a String, a BytesMessage for a byte array, a MapMessage for a Map, and an ObjectMessage for a Serializable object. |
| SimpleMessageConverter | back to summary |
|---|---|
| public SimpleMessageConverter() | |
| createMessageForByteArray | back to summary |
|---|---|
| protected BytesMessage createMessageForByteArray(byte[] bytes, Session session) throws JMSException Create a JMS BytesMessage for the given byte array.
| |
| createMessageForMap | back to summary |
|---|---|
| protected MapMessage createMessageForMap(Map<?, ?> map, Session session) throws JMSException Create a JMS MapMessage for the given Map.
| |
| createMessageForSerializable | back to summary |
|---|---|
| protected ObjectMessage createMessageForSerializable(Serializable object, Session session) throws JMSException Create a JMS ObjectMessage for the given Serializable object.
| |
| createMessageForString | back to summary |
|---|---|
| protected TextMessage createMessageForString(String text, Session session) throws JMSException Create a JMS TextMessage for the given String.
| |
| extractByteArrayFromMessage | back to summary |
|---|---|
| protected byte[] extractByteArrayFromMessage(BytesMessage message) throws JMSException Extract a byte array from the given
| |
| extractMapFromMessage | back to summary |
|---|---|
| protected Map Extract a Map from the given
| |
| extractSerializableFromMessage | back to summary |
|---|---|
| protected Serializable extractSerializableFromMessage(ObjectMessage message) throws JMSException Extract a Serializable object from the given
| |
| extractStringFromMessage | back to summary |
|---|---|
| protected String extractStringFromMessage(TextMessage message) throws JMSException Extract a String from the given TextMessage.
| |