/**
 * MessageImpl.java
 * Created Apr 26, 2006
 * Copyright (C) Tandberg Television 2006
 */
package com.tandbergtv.workflow.message;


/**
 * Default implementation of the Adaptor IMessage interface
 * 
 * @author Sahil Verma
 */
public class MessageImpl extends AbstractMessage {

	/**
	 * Default Constructor. Creates a message with empty String Payload.
	 */
	public MessageImpl() {
		this(new StringPayload(), null);
	}
	
	
	/**
	 * Creates a MessageImpl with the specified parameters
	 * @param payload
	 */
	public MessageImpl(IPayload payload) {
		this(payload, null);
	}

	/**
	 * Creates a MessageImpl with the specified parameters
	 * 
	 * @param payload
	 * @param attachment
	 */
	public MessageImpl(IPayload payload, IMessageAttachment attachment) {
		super(payload, attachment);
		
		if (this.getPayload() == null)
			this.setPayload(new StringPayload());
	}
}
