package com.szpg.plc.message;

import java.util.Calendar;
import java.util.UUID;

public abstract class AppCommand extends AppMessage {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2819290815081490558L;
	
	private String id;
	private String destinationId;
	private CommandResponse commandResponse;
	
	/**
	 * 基类的构造函数
	 * 自动生成ID和时间
	 */
	public AppCommand() {
		this.setId(UUID.randomUUID().toString().replace("-", ""));
		this.setTime(Calendar.getInstance());
	}
	
	@SuppressWarnings("rawtypes")
	public abstract Class getResponseClass();

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDestinationId() {
		return destinationId;
	}

	public void setDestinationId(String destinationId) {
		this.destinationId = destinationId;
	}

	public CommandResponse getCommandResponse() {
		return commandResponse;
	}

	public void setCommandResponse(CommandResponse commandResponse) {
		this.commandResponse = commandResponse;
	}
}
