org.apache.servicemix.components.util
Class MessageHelper

java.lang.Object
  extended by org.apache.servicemix.components.util.MessageHelper

Deprecated.

public final class MessageHelper
extends Object

Some helper methods for working with messages

Version:
$Revision: $

Method Summary
static Object getBody(javax.jbi.messaging.NormalizedMessage message)
          Deprecated. A helper method to return the body of the message as a POJO which could be a bean or some DOMish model of the body.
static Object getBody(javax.jbi.messaging.NormalizedMessage message, PojoMarshaler marshaller)
          Deprecated. A helper method to return the body of the message as a POJO which could be a bean or some DOMish model of the body.
static void setBody(javax.jbi.messaging.NormalizedMessage message, Object body)
          Deprecated. Sets the body of the message as a POJO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBody

public static Object getBody(javax.jbi.messaging.NormalizedMessage message)
                      throws javax.jbi.messaging.MessagingException
Deprecated. 
A helper method to return the body of the message as a POJO which could be a bean or some DOMish model of the body.

Parameters:
message - the message on which to extract the body
Returns:
the body of the message as a POJO or DOM object
Throws:
javax.jbi.messaging.MessagingException

getBody

public static Object getBody(javax.jbi.messaging.NormalizedMessage message,
                             PojoMarshaler marshaller)
                      throws javax.jbi.messaging.MessagingException
Deprecated. 
A helper method to return the body of the message as a POJO which could be a bean or some DOMish model of the body.

Parameters:
message - the message on which to extract the body
marshaller - the marshaller used to map from the XML representation to the POJO
Returns:
the body of the message as a POJO or DOM object
Throws:
javax.jbi.messaging.MessagingException

setBody

public static void setBody(javax.jbi.messaging.NormalizedMessage message,
                           Object body)
                    throws javax.jbi.messaging.MessagingException
Deprecated. 
Sets the body of the message as a POJO

Parameters:
message - the message on which to set the body
body - the POJO or DOMish model to set
Throws:
javax.jbi.messaging.MessagingException


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.