This class is deprecated.
as of Spring 3.0, in favor of the JMS 1.1 based SimpleMessageConverter
Class Overview
A subclass of SimpleMessageConverter
for the JMS 1.0.2 specification,
not relying on JMS 1.1 methods like SimpleMessageConverter itself.
This class can be used for JMS 1.0.2 providers, offering the same functionality
as SimpleMessageConverter does for JMS 1.1 providers.
The only difference to the default SimpleMessageConverter is that BytesMessage
is handled differently: namely, without using the getBodyLength()
method which has been introduced in JMS 1.1 and is therefore not available on a
JMS 1.0.2 provider.
See Also
- javax.jms.BytesMessage#getBodyLength()
Summary
Protected Methods |
byte[]
|
extractByteArrayFromMessage(BytesMessage message)
Overrides superclass method to copy bytes from the message into a
ByteArrayOutputStream, using a buffer, to avoid using the
getBodyLength() method which has been introduced in
JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.
|
[Expand]
Inherited Methods |
From class
org.springframework.jms.support.converter.SimpleMessageConverter
BytesMessage
|
createMessageForByteArray(byte[] bytes, Session session)
Create a JMS BytesMessage for the given byte array.
|
MapMessage
|
createMessageForMap(Map<?, ?> map, Session session)
Create a JMS MapMessage for the given Map.
|
ObjectMessage
|
createMessageForSerializable(Serializable object, Session session)
Create a JMS ObjectMessage for the given Serializable object.
|
TextMessage
|
createMessageForString(String text, Session session)
Create a JMS TextMessage for the given String.
|
byte[]
|
extractByteArrayFromMessage(BytesMessage message)
Extract a byte array from the given BytesMessage.
|
Map
|
extractMapFromMessage(MapMessage message)
Extract a Map from the given MapMessage.
|
Serializable
|
extractSerializableFromMessage(ObjectMessage message)
Extract a Serializable object from the given ObjectMessage.
|
String
|
extractStringFromMessage(TextMessage message)
Extract a String from the given TextMessage.
|
Object
|
fromMessage(Message message)
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.
|
Message
|
toMessage(Object object, Session session)
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.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.jms.support.converter.MessageConverter
abstract
Object
|
fromMessage(Message message)
Convert from a JMS Message to a Java object.
|
abstract
Message
|
toMessage(Object object, Session session)
Convert a Java object to a JMS Message using the supplied session
to create the message object.
|
|
Constants
public
static
final
int
BUFFER_SIZE
Constant Value:
4096
(0x00001000)
Public Constructors
public
SimpleMessageConverter102
()
Protected Methods
protected
byte[]
extractByteArrayFromMessage
(BytesMessage message)
Overrides superclass method to copy bytes from the message into a
ByteArrayOutputStream, using a buffer, to avoid using the
getBodyLength()
method which has been introduced in
JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.
Parameters
message
| the message to convert |
See Also
- javax.jms.BytesMessage#getBodyLength()