org.apache.servicemix.jbi.api
Interface Message

All Superinterfaces:
javax.jbi.messaging.NormalizedMessage

public interface Message
extends javax.jbi.messaging.NormalizedMessage

An extension of the standard NormalizedMessage which allows you to work directly with message bodies as POJOs ignoring the XML stuff or passing a binary message around as a ByteBuffer or byte[]

Version:
$Revision: 359151 $

Method Summary
 javax.jbi.messaging.Fault createFault()
          Helper method to create a new fault for this message exchange
 java.lang.Object getBody()
          Returns the body as a POJO.
 java.lang.Object getBody(PojoMarshaler marshaler)
          Returns the body as a POJO.
 javax.jbi.messaging.MessageExchange getExchange()
          Returns the message exchange
 void setBody(java.lang.Object body)
          Sets the body as a POJO
 
Methods inherited from interface javax.jbi.messaging.NormalizedMessage
addAttachment, getAttachment, getAttachmentNames, getContent, getProperty, getPropertyNames, getSecuritySubject, removeAttachment, setContent, setProperty, setSecuritySubject
 

Method Detail

getBody

java.lang.Object getBody()
                         throws javax.jbi.messaging.MessagingException
Returns the body as a POJO. Depending on the implementation this could be a Java POJO, a DOM tree or a byte[]

Throws:
javax.jbi.messaging.MessagingException

getBody

java.lang.Object getBody(PojoMarshaler marshaler)
                         throws javax.jbi.messaging.MessagingException
Returns the body as a POJO. Depending on the implementation this could be a Java POJO, a DOM tree or a byte[]

Parameters:
marshaler - marshaler to be used for conversion
Throws:
javax.jbi.messaging.MessagingException

setBody

void setBody(java.lang.Object body)
             throws javax.jbi.messaging.MessagingException
Sets the body as a POJO

Throws:
javax.jbi.messaging.MessagingException

getExchange

javax.jbi.messaging.MessageExchange getExchange()
Returns the message exchange


createFault

javax.jbi.messaging.Fault createFault()
                                      throws javax.jbi.messaging.MessagingException
Helper method to create a new fault for this message exchange

Throws:
javax.jbi.messaging.MessagingException


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