/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */

package org.jfox.framework.deploy;

import java.io.File;
import java.net.URL;
import java.net.URLClassLoader;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public interface Deployable {

    /**
     * get the xml descriptor URL
     *
     * @return
     */
    URL getDescriptorURL();

    /**
     * get the component url to be deployed, directory or file
     *
     * @return
     */
    File getModuleFile();

    /**
     * get the classloader that can load  the component
     *
     * @return
     */
    URLClassLoader getClassLoader();

    /**
     * deploy to directory
     */
    void deploy(Deployer deployer) throws DeployException;

    /**
     * get the directory that the component to be deployed
     * some type modules needed, example war,ear
     */
    File getTempDeployDirectory();
}
