xmlBlaster 2.2.0 API

org.xmlBlaster.jms
Class MessageHelper

java.lang.Object
  extended by org.xmlBlaster.jms.MessageHelper

public class MessageHelper
extends java.lang.Object

MessageHelper. Implementation details about how

Author:
Michele Laghi

Field Summary
private static java.util.logging.Logger log
           
 
Constructor Summary
MessageHelper()
           
 
Method Summary
static XBMessage convertFromMsgUnit(XBSession session, java.lang.String sender, MsgKeyData keyData, byte[] content, MsgQosData qosData)
          Used in the message consumer update method.
static XBMessage convertFromMsgUnit(XBSession session, java.lang.String sender, MsgUnit msgUnit)
          Used in the message consumer receive method.
static MsgUnit convertToMessageUnit(Global global, javax.jms.Message msg)
          This method converts a message (which could be from a foreign provider but also an own XBMessage) to a MsgUnit (internal XmlBlaster messages).
(package private) static void copyProperties(javax.jms.Message sourceMsg, javax.jms.Message destMsg)
          Currently only used in streaming messages to build the chunks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log
Constructor Detail

MessageHelper

public MessageHelper()
Method Detail

copyProperties

static void copyProperties(javax.jms.Message sourceMsg,
                           javax.jms.Message destMsg)
                    throws javax.jms.JMSException
Currently only used in streaming messages to build the chunks.

Parameters:
sourceMsg -
destMsg -
Throws:
javax.jms.JMSException

convertToMessageUnit

public static MsgUnit convertToMessageUnit(Global global,
                                           javax.jms.Message msg)
                                    throws javax.jms.JMSException,
                                           XmlBlasterException,
                                           java.io.IOException
This method converts a message (which could be from a foreign provider but also an own XBMessage) to a MsgUnit (internal XmlBlaster messages). This method is called internally by us as a provider. More specifically this is only used on the Message Producer send method. This method is made public only for testing purposes.

Parameters:
global -
msg -
Returns:
the created message unit.
Throws:
javax.jms.JMSException
XmlBlasterException
java.io.IOException

convertFromMsgUnit

public static XBMessage convertFromMsgUnit(XBSession session,
                                           java.lang.String sender,
                                           MsgUnit msgUnit)
                                    throws javax.jms.JMSException,
                                           XmlBlasterException,
                                           java.io.IOException
Used in the message consumer receive method.

Throws:
javax.jms.JMSException
XmlBlasterException
java.io.IOException

convertFromMsgUnit

public static XBMessage convertFromMsgUnit(XBSession session,
                                           java.lang.String sender,
                                           MsgKeyData keyData,
                                           byte[] content,
                                           MsgQosData qosData)
                                    throws javax.jms.JMSException,
                                           XmlBlasterException,
                                           java.io.IOException
Used in the message consumer update method.

Parameters:
session -
sender -
keyData -
content -
qosData -
Returns:
Throws:
javax.jms.JMSException
XmlBlasterException
java.io.IOException

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.