package ws.prova;

/*
 * Copyright (C) 2002-2007 <a href="mailto:a.kozlenkov@city.ac.uk">Alex Kozlenkov</a>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/**
 * Class encapsulating the data necessary for sending Prova messages
 * <p>Title: Prova </p>
 * <p>Description: SendData class with data for sending messages</p>
 * <p>Copyright: Copyright (c) 2005</p>
 * <p>Company: City University</p>
 * Prova complete re-write
 *
 * @author <A HREF="mailto:a.kozlenkov@city.ac.uk">Alex Kozlenkov</A>
 * @version 2.0 <25 March 2007>
 */
public class SendData {
	Messenger messenger;
	String receiver;
	String protocol;
	RMessage toSend;

	public SendData(Messenger messenger, String receiver,
					String protocol, RMessage toSend) {
		this.messenger = messenger;
		this.receiver = receiver;
		this.protocol = protocol;
		this.toSend = toSend;
	}

	String receiver() {
		return receiver;
	}

	String protocol() {
		return protocol;
	}

	RMessage toSend() {
		return toSend;
	}

	void send() {
		messenger.send(this);
	}
}
