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

freak.core.modulesupport.Module Maven / Gradle / Ivy

There is a newer version: 0.4.7
Show newest version
/*
 * This file is part of FrEAK. For licensing and copyright information
 * please see the file COPYING in the root directory of this
 * distribution or contact .
 */

package freak.core.modulesupport;

import java.io.Serializable;

import freak.core.control.ScheduleInterface;

/**
 * The interface for all modules. Modules are components that can be selected 
 * by the user and therefore they provide a name and a textual description that
 * can be displayed by the GUI. 
 * 
 * @author Dirk
 */
public interface Module extends Serializable {
	/**
	 * Returns the name of the module.
	 * 
	 * @return the name of the module.
	 */
	public String getName();

	/**
	 * Returns a textual description of the module and its functionality that
	 * can be displayed by the GUI.
	 * 
	 * @return a textual description of the module. 
	 */
	public String getDescription();

	/**
	 * This method adds every Event the Module wants to register
	 * itself at to the global EventController in the Schedule.
	 * Event-registration and removement from event queues is managed by this
	 * EventController.
	 * createEvents creates static as well as non-static events.
	 */
	public void createEvents();
	
	/**
	 * Initializes the module after initialization or when the schedule is 
	 * changed.
	 * initialize is called after the module's instantiation and 
	 * every time a relevant module in the current schedule is re-configured or 
	 * exchanged by another module. 
	 */
	public void initialize();
	
	/**
	 * Tests if the module can run with the specified schedule.
	 * 
	 * @param schedule the schedule to be tested.
	 * @throws UnsupportedEnvironmentException if the module cannot run with the specified schedule.
	 */
	public void testSchedule(ScheduleInterface schedule) throws UnsupportedEnvironmentException;
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy