当前页面:
在线文档首页 >
Spring Framework 2.0.5 API 文档英文版
SimpleMessageConverter102 (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版
org.springframework.jms.support.converter
Class SimpleMessageConverter102
java.lang.Object
org.springframework.jms.support.converter.SimpleMessageConverter
org.springframework.jms.support.converter.SimpleMessageConverter102
- All Implemented Interfaces:
- MessageConverter
public class SimpleMessageConverter102
- extends SimpleMessageConverter
A subclass of SimpleMessageConverter that uses the JMS 1.0.2 specification,
rather than the JMS 1.1 methods used by 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.
- Since:
- 1.1.1
- Author:
- Juergen Hoeller
- See Also:
BytesMessage.getBodyLength()
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUFFER_SIZE
public static final int BUFFER_SIZE
- See Also:
- Constant Field Values
SimpleMessageConverter102
public SimpleMessageConverter102()
extractByteArrayFromMessage
protected byte[] extractByteArrayFromMessage(BytesMessage message)
throws JMSException
- 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.
- Overrides:
extractByteArrayFromMessage
in class SimpleMessageConverter
- Parameters:
message
- the message to convert
- Returns:
- the resulting byte array
- Throws:
JMSException
- if thrown by JMS methods- See Also:
BytesMessage.getBodyLength()
Copyright © 2002-2007 The Spring Framework.