KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > interfaces > Deployer


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix.interfaces;
9
10 import java.net.URL JavaDoc;
11
12 /**
13  * A Deployer is responsible for taking a URL (ie a jar/war/ear) and deploying
14  * it to a particular "location". "location" means different things for
15  * different containers. For a servlet container it may mean the place to
16  * mount servlet (ie /myapp --> /myapp/Cocoon.xml is mapping cocoon servlet to
17  * /myapp context).
18  *
19  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
20  * @see DeployerMBean
21  */

22 public interface Deployer
23 {
24     String JavaDoc ROLE = Deployer.class.getName();
25
26     /**
27      * Deploy an installation.
28      *
29      * @param name the name of deployment
30      * @param location the installation to deploy
31      * @throws DeploymentException if an error occurs
32      */

33     void deploy( String JavaDoc name, URL JavaDoc location )
34         throws DeploymentException;
35
36     /**
37      * undeploy a resource from a location.
38      *
39      * @param name the name of deployment
40      * @throws DeploymentException if an error occurs
41      */

42     void undeploy( String JavaDoc name )
43         throws DeploymentException;
44
45     /**
46      * Determine if a deployment has matching name.
47      *
48      * @param name the name of deployment
49      * @return true if deployed by this deployer, false otherwise
50      */

51     //boolean isDeployed( String name );
52
}
53
Popular Tags