All Downloads are FREE. Search and download functionalities are using the official Maven repository.

co.edu.uniquindio.utils.command.ThreadCommand Maven / Gradle / Ivy

/*
 *  Communication project implement communication point to point and multicast
 *  Copyright (C) 2010  Daniel Pelaez, Daniel Lopez, Hector Hurtado
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 *  This program 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 Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see .
 *  
 */

package co.edu.uniquindio.utils.command;

/**
 * The ThreadCommand class is an implementation of the command
 * pattern that execute the {@code Thread.start()} method
 * 
 * 
 * @author Daniel Pelaez
 * @author Hector Hurtado
 * @author Daniel Lopez
 * @version 1.0, 17/06/2010
 * @since 1.0
 * 
 */
public abstract class ThreadCommand implements Command, Runnable {
	/**
	 * Execute an thread
	 */
	public void execute() {
		Thread thread = new Thread(this);
		thread.start();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy