org.apache.qpid.client.message
Class MessageFactoryRegistry
java.lang.Object
org.apache.qpid.client.message.MessageFactoryRegistry
public class MessageFactoryRegistry
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageFactoryRegistry
public MessageFactoryRegistry()
registerFactory
public void registerFactory(java.lang.String mimeType,
MessageFactory mf)
deregisterFactory
public MessageFactory deregisterFactory(java.lang.String mimeType)
createMessage
public AbstractJMSMessage createMessage(long deliveryTag,
boolean redelivered,
org.apache.qpid.framing.ContentHeaderBody contentHeader,
java.util.List bodies)
throws org.apache.qpid.AMQException,
javax.jms.JMSException
- Create a message. This looks up the MIME type from the content header and instantiates the appropriate
concrete message type.
- Parameters:
deliveryTag
- the AMQ message idredelivered
- true if redeliveredcontentHeader
- the content header that was receivedbodies
- a list of ContentBody instances
- Returns:
- the message.
- Throws:
org.apache.qpid.AMQException
javax.jms.JMSException
createMessage
public AbstractJMSMessage createMessage(java.lang.String mimeType)
throws org.apache.qpid.AMQException,
javax.jms.JMSException
- Throws:
org.apache.qpid.AMQException
javax.jms.JMSException
newDefaultRegistry
public static MessageFactoryRegistry newDefaultRegistry()
- Construct a new registry with the default message factories registered
- Returns:
- a message factory registry