package model;

import java.net.InetAddress;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public abstract class Message {
	
	/*** ATTRIBUTS ***/
	private Date date;
	private InetAddress autorIP;
	
	/**
	 *  Constructor of Message
	 * @parametres
	 * 		@param authorIP : InetAddress
	 * @description
	 * <p>
	 * 		
	 * </p>
	 */
	public Message(InetAddress autorIP) {
		this.autorIP = autorIP;
		DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
		this.date = new Date();
	}
	/*** GETTERS ***/
	public Date getDate() {
		return date;
	}
	public InetAddress getAutorIP() {
		return autorIP;
	}
	
	/*** SETTERS ***/
	public void setDate(Date date) {
		this.date = date;
	}
	public void setAutorIP(InetAddress autorIP) {
		this.autorIP = autorIP;
	}
	
	
	public abstract Object getMessage(); 
}
