Package org.servicemix

Examples of org.servicemix.JavaSource


     * @throws MessagingException
     */
    public Object getBody(NormalizedMessage message) throws MessagingException {
        Source content = message.getContent();
        if (content instanceof JavaSource) {
            JavaSource source = (JavaSource) content;
            return source.getObject();
        }
        if (message instanceof NormalizedMessageImpl) {
            return ((NormalizedMessageImpl) message).getBody();
        }
        return message.getProperty(Marshaler.BODY);
View Full Code Here


     * @throws MessagingException
     */
    public void setBody(NormalizedMessage message, Object body) throws MessagingException {
        Source content = message.getContent();
        if (content instanceof JavaSource) {
            JavaSource source = (JavaSource) content;
            source.setObject(body);
        }
        else if (message instanceof NormalizedMessageImpl) {
            ((NormalizedMessageImpl) message).setBody(body);
        }
        else {
View Full Code Here

TOP

Related Classes of org.servicemix.JavaSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.