/* $Id: ProxyStateEvent.java,v 1.1 2004/01/09 16:54:18 burkhard Exp $
 * Created on 22.05.2003 by sell
 *
 */
package de.skyrix.zsp.event;

import java.awt.AWTEvent;

/**An Event that indicates, that the online state of
 * the proxy has changed.
 * 
 * The {@link #isOnline() isOnline()} method can be used to
 * determine the proxy state.
 * 
 * @see de.skyrix.zsp.logic.Proxy
 * @see ProxyStateEvent
 * 
 * @author sell
 * @version 
 */
public class ProxyStateEvent extends AWTEvent {
	private boolean online = false;

	/**Create the event.
	 * 
	 * @param source - the sender
	 * @param id     - event id (can be ignored)
	 * @param online - true if proxy switched state to online, false otherwise
	 */
	public ProxyStateEvent(Object source, int id, boolean online) {
		super(source, id);
		this.online = online;
	}

	/**Determines wheter the proxy is online or offline.
	 * 
	 * @return true if proxy switched state to online, false otherwise
	 */
	public boolean isOnline() {
		return online;
	}
}
