package com.eactive.eai.transformer.message.generator;

import com.eactive.eai.transformer.layout.Layout;
import com.eactive.eai.transformer.message.BytesMessage;
import com.eactive.eai.transformer.message.Message;

/**
 * 현재는 고정 필드에 대해서만 처리할 수가 있음.
 */
public class BytesMessageGenerator implements MessageGenerator {
    public Message createMessage(Layout layout, boolean initialize, boolean useDefault) throws Exception {
        BytesMessage message = (BytesMessage) layout.getRootItem();
        message = (BytesMessage) message.clone();
        message.createObject();
        return message;
    }
}
