Home » jboss-javaee-sources » javax.enterprise.deploy » spi » factories » [javadoc | source]

    1   /*
    2   * JBoss, Home of Professional Open Source
    3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
    4   * by the @authors tag. See the copyright.txt in the distribution for a
    5   * full listing of individual contributors.
    6   *
    7   * This is free software; you can redistribute it and/or modify it
    8   * under the terms of the GNU Lesser General Public License as
    9   * published by the Free Software Foundation; either version 2.1 of
   10   * the License, or (at your option) any later version.
   11   *
   12   * This software is distributed in the hope that it will be useful,
   13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   15   * Lesser General Public License for more details.
   16   *
   17   * You should have received a copy of the GNU Lesser General Public
   18   * License along with this software; if not, write to the Free
   19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
   21   */
   22   package javax.enterprise.deploy.spi.factories;
   23   
   24   // $Id: DeploymentFactory.java 37459 2005-10-30 00:04:02Z starksm $
   25   
   26   import javax.enterprise.deploy.spi.DeploymentManager;
   27   import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
   28   
   29   /**
   30    * The DeploymentFactory interface is a deployment driver for a J2EE plaform product. 
   31    * 
   32    * It returns a DeploymentManager object which represents a connection to a specific J2EE platform product.
   33    * Each application server vendor must provide an implementation of this class in order for the J2EE 
   34    * Deployment API to work with their product.
   35    * 
   36    * The class implementing this interface should have a public no-argument constructor, 
   37    * and it should be stateless (two instances of the class should always behave the same). 
   38    * It is suggested but not required that the class have a static initializer that registers 
   39    * an instance of the class with the DeploymentFactoryManager class.
   40    * 
   41    * A connected or disconnected DeploymentManager can be requested. 
   42    * A DeploymentManager that runs connected to the platform can provide access to J2EE resources. 
   43    * A DeploymentManager that runs disconnected only provides module deployment configuration support. 
   44    *
   45    * @author <a href="mailto:adrian@jboss.org">Adrian Brock</a>
   46    * @version $Revision: 37459 $
   47    */
   48   public interface DeploymentFactory
   49   {
   50      // Constants -----------------------------------------------------
   51      
   52      // Public --------------------------------------------------------
   53      
   54      /**
   55       * Tests whether the factory can create a manager for the URI
   56       *
   57       * @param uri the uri
   58       * @return true when it can, false otherwise
   59       */
   60      boolean handlesURI(String uri);
   61   
   62      /**
   63       * Get a connected deployment manager
   64       *
   65       * @param uri the uri of the deployment manager
   66       * @param userName the user name
   67       * @param password the password 
   68       * @return the deployment manager
   69       * @throws DeploymentManagerCreationException
   70       */
   71      DeploymentManager getDeploymentManager(String uri, String userName, String password) throws DeploymentManagerCreationException;
   72   
   73      /**
   74       * Get a disconnected version of the deployment manager
   75       *
   76       * @param uri the uri to connect to
   77       * @return the disconnected deployment manager
   78       * @throws DeploymentManagerCreationException
   79       */
   80      DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException;
   81      
   82      /**
   83       * The vendor of the deployment manager
   84       *
   85       * @return the vendor name
   86       */
   87      String getDisplayName();
   88      
   89      /**
   90       * The version of the deployment manager
   91       *
   92       * @return the version
   93       */
   94      String getProductVersion();
   95   }

Home » jboss-javaee-sources » javax.enterprise.deploy » spi » factories » [javadoc | source]