Package org.servicemix.components

Source Code of org.servicemix.components.HelloWorldComponent

package org.servicemix.components;

import org.servicemix.components.util.TransformComponentSupport;
import org.servicemix.jbi.jaxp.StringSource;

import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.MessagingException;
import javax.jbi.messaging.NormalizedMessage;

public class HelloWorldComponent extends TransformComponentSupport {

    private String property;
   
    protected boolean transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out)
            throws MessagingException {
        out.setContent(new StringSource("<hello>" + in.getProperty(property) + "</hello>"));
        return true;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

}
TOP

Related Classes of org.servicemix.components.HelloWorldComponent

TOP
Copyright © 2018 www.massapi.com. 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.