⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 applicationfactory.java

📁 p2p仿真器。开发者可以工作在覆盖层中进行创造和测试逻辑算法或者创建和测试新的服务。PlanetSim还可以将仿真代码平稳转换为在Internet上的实验代码
💻 JAVA
字号:
package planet.commonapi.factory;

import planet.commonapi.Application;
import planet.commonapi.exception.InitializationException;

/**
 * This interface abstracts the task of generate new instances of Application,
 * using the factory method design pattern.
 * <br><br>
 * Any future implementation must contain the no argument constructor.
 * <br><br>
 * @see planet.commonapi.Application Application
 * @author <a href="mailto: jordi.pujol@estudiants.urv.es">Jordi Pujol</a>
 * 07-jul-2005
 */
public interface ApplicationFactory {
    
    /**
     * Initializes the ApplicationFactory with the specified values.
     * @param application Related Class instance for the current Application in use.
     * @return The same instance once it has been updated.
     * @throws InitializationException if any error occurs during the 
     * initialization process.
     */
    public ApplicationFactory setValues(Class application) throws InitializationException;
    
	/**
	 * Generates a new instance of the actual Application class. The name of
	 * Application is setting the default one by its implementation.
	 * @return A new instance of the Application
	 * @see planet.commonapi.Application
	 */
	public Application buildApplication() throws InitializationException;
	
	/**
	 * Generates a new instance of the Application class <b>app</b>. This value
	 * must be an existing Application implementation. The Application's name is
	 * setting by the implementation owner.
	 * @param app Class completly defined of the Application to generate only by this method call.
	 * @return A new instance of Application. Its class is <b>app</b>
	 * @see planet.commonapi.Application
	 */
	public Application buildApplication(String app) throws InitializationException;
	
	/**
	 * Generates a new instance of the actual Application class. The name of Application is
	 * overwriting by <b>name</b>.
	 * @return A new instance of the Application
	 * @see planet.commonapi.Application
	 * @param name Name for the application to generate.
	 */
	public Application buildApplicationWithName(String name) throws InitializationException;
	
	/**
	 * Generates a new instance of the Application class <b>app</b>. This value
	 * must be an existing Application implementation. The name of Application is
	 * overwriting by <b>name</b>.
	 * @param app Class completly defined of the Application to generate only by this method call.
	 * @return A new instance of Application. Its class is <b>app</b>
	 * @see planet.commonapi.Application
	 * @param name Name for the application to generate.
	 */
	public Application buildApplicationWithName(String app,String name) throws InitializationException;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -