You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jim Marino <jm...@myroma.net> on 2006/01/13 20:19:34 UTC

Difference between getBody() and getPayload() in Message.java

Can someone tell me the difference between  
o.a.t.c.message.Message.getBody() and  
o.a.t.c.message.Message.getPayload()? In  
o.a.t.c.message.impl.MessageImpl they return the same thing  
(super.getBody()). I think they should return different things. In  
the case of a message flowing through an entry point, getBody houses  
the deserialized message body. getPayload() should return an object  
used to deserialize the raw message as it comes off the wire. As the  
message progresses through a series of handlers related to the entry  
point binding, the contents of getPayload() may change. For example,  
it could start off with the HTTP request and then get converted to  
something that streams which handlers access as they deserialize the  
message.  Of course this assumes handlers may need to be in a  
particular order.

Do people see complications or drawbacks with this approach?

Jim