Package org.switchyard.component.camel.deploy.support

Source Code of org.switchyard.component.camel.deploy.support.WarehouseServiceImpl

package org.switchyard.component.camel.deploy.support;

import java.io.IOException;

import javax.inject.Inject;

import org.switchyard.Message;
import org.switchyard.common.io.pull.StringPuller;
import org.switchyard.component.bean.Service;

@Service(WarehouseService.class)
public class WarehouseServiceImpl implements WarehouseService {

    @Override
    public String hasItem(Integer id) {
        return "Fletch";
    }

    @Inject
    Message _message;

    @Override
    public String getDataForItem(String itemId) {
        try {
            return new StringPuller().pull(_message.getAttachment(itemId).getInputStream());
        } catch (IOException ioe) {
            throw new RuntimeException(ioe);
        }
    }

}
TOP

Related Classes of org.switchyard.component.camel.deploy.support.WarehouseServiceImpl

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.