package de.ctdo.bunti;

import java.util.Map;

import org.springframework.context.ApplicationEvent;

import de.ctdo.bunti.model.BuntiDevice;

public class DeviceChangedEvent extends ApplicationEvent {
	private static final long serialVersionUID = 104525838879412827L;
	private BuntiDevice device;
	private Map<String, Object> options;

	public DeviceChangedEvent(Object source, BuntiDevice device, Map<String, Object> options) {
		super(source);
		
		this.device = device;
		this.options = options;
	}

	public final BuntiDevice getDevice() {
		return device;
	}

	public final Map<String, Object> getOptions() {
		return options;
	}

	@Override
	public final String toString() {
		return "DeviceChangedEvent " + getDevice().getDeviceName();
	}
	
}
