Save This Page
Home » axis2-1.5-src » org.apache » axis2 » deployment » [javadoc | source]
org.apache.axis2.deployment
abstract public class: DeploymentEngine [javadoc | source]
java.lang.Object
   org.apache.axis2.deployment.DeploymentEngine

All Implemented Interfaces:
    DeploymentConstants

Direct Known Subclasses:
    WarBasedAxisConfigurator, ScriptDeploymentEngine, URLBasedAxisConfigurator, FileSystemConfigurator, OSGiServerConfigurator

Field Summary
protected static  String webLocationString     
protected  Scheduler scheduler     
protected  boolean hotUpdate    Support for hot update is controlled by this flag 
protected  boolean hotDeployment    Support for hot deployment is controlled by this flag 
protected  List wsToDeploy    Stores all the web Services to deploy. 
protected  List wsToUnDeploy    Stores all the web Services to undeploy. 
protected  AxisConfiguration axisConfig    to keep a ref to engine register this ref will pass to engine when it call start() method 
protected  ConfigurationContext configContext     
protected  RepositoryListener repoListener     
protected  String servicesPath     
protected  File servicesDir     
protected  String modulesPath     
protected  File modulesDir     
protected  ServiceDeployer serviceDeployer     
protected  ModuleDeployer moduleDeployer     
Method from org.apache.axis2.deployment.DeploymentEngine Summary:
addNewModule,   addServiceGroup,   addWSToDeploy,   addWSToUndeploy,   buildModule,   buildService,   buildServiceGroup,   cleanup,   doDeploy,   engageModules,   fillServiceGroup,   getAxisConfig,   getAxisServiceName,   getDeployer,   getDeployerForExtension,   getDeployers,   getFileList,   getModule,   getModuleDeployer,   getModulesDir,   getRepoListener,   getRepositoryDir,   getRepositoryPath,   getServiceDeployer,   getServicesDir,   getWebLocationString,   isHotUpdate,   loadDefaultMessageReceiver,   loadFromClassPath,   loadRepository,   loadRepositoryFromURL,   loadServiceGroup,   loadServices,   loadServicesFromUrl,   populateAxisConfiguration,   populateService,   prepareRepository,   setClassLoaders,   setConfigContext,   setDeployers,   setDeploymentFeatures,   setExtensionToDeployerMappingMap,   setWebLocationString,   startSearch,   unDeploy
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.axis2.deployment.DeploymentEngine Detail:
 public static  void addNewModule(AxisModule modulemetadata,
    AxisConfiguration axisConfiguration) throws AxisFault 
 public static  void addServiceGroup(AxisServiceGroup serviceGroup,
    ArrayList serviceList,
    URL serviceLocation,
    DeploymentFileData currentDeploymentFile,
    AxisConfiguration axisConfiguration) throws AxisFault 
 public  void addWSToDeploy(DeploymentFileData file) 
 public  void addWSToUndeploy(WSInfo file) 
 public static AxisModule buildModule(File modulearchive,
    AxisConfiguration config) throws DeploymentException 
    Builds an AxisModule for a given module archive file. This does not called the init method since there is no reference to configuration context so who ever create module using this has to called module.init if it is required
 public static AxisService buildService(InputStream serviceInputStream,
    ConfigurationContext configCtx) throws DeploymentException 
    Fills an axisservice object using services.xml. First creates an axisservice object using WSDL and then fills it using the given services.xml. Loads all the required class and builds the chains, finally adds the servicecontext to EngineContext and axisservice into EngineConfiguration.
 public static AxisServiceGroup buildServiceGroup(InputStream servicesxml,
    ClassLoader classLoader,
    String serviceGroupName,
    ConfigurationContext configCtx,
    ArchiveReader archiveReader,
    HashMap wsdlServices) throws AxisFault 
    To build a AxisServiceGroup for a given services.xml You have to add the created group into AxisConfig
 public  void cleanup() 
    Clean up the mess
 public  void doDeploy() 
 public  void engageModules() throws AxisFault 
    Checks if the modules, referred by server.xml, exist or that they are deployed.
 protected static  void fillServiceGroup(AxisServiceGroup serviceGroup,
    ArrayList serviceList,
    URL serviceLocation,
    AxisConfiguration axisConfig) throws AxisFault 
 public AxisConfiguration getAxisConfig() 
    Gets AxisConfiguration.
 public static String getAxisServiceName(String fileName) 
    Retrieves service name from the archive file name. If the archive file name is service1.aar , then axis2 service name would be service1
 public Deployer getDeployer(String directory,
    String extension) 
 public Deployer getDeployerForExtension(String extension) 
 public Map getDeployers() 
 protected ArrayList getFileList(URL fileListUrl) 
 public AxisModule getModule(String moduleName) throws AxisFault 
 public ModuleDeployer getModuleDeployer() 
 public File getModulesDir() 
 public RepositoryListener getRepoListener() 
 public File getRepositoryDir() 
 protected String getRepositoryPath(File repository) 
 public ServiceDeployer getServiceDeployer() 
 public File getServicesDir() 
 public static String getWebLocationString() 
 public boolean isHotUpdate() 
 protected MessageReceiver loadDefaultMessageReceiver(String mepURL,
    AxisService service) 
 public  void loadFromClassPath() throws DeploymentException 
 public  void loadRepository(String repoDir) throws DeploymentException 
 public  void loadRepositoryFromURL(URL repoURL) throws DeploymentException 
 public static AxisServiceGroup loadServiceGroup(File serviceFile,
    ConfigurationContext configCtx) throws AxisFault 
 public  void loadServices() 
 public  void loadServicesFromUrl(URL repoURL) 
 public AxisConfiguration populateAxisConfiguration(InputStream in) throws DeploymentException 
    To get AxisConfiguration for a given inputStream this method can be used. The inputstream should be a valid axis2.xml , else you will be getting DeploymentExceptions.

    First creat a AxisConfiguration using given inputSream , and then it will try to find the repository location parameter from AxisConfiguration, so if user has add a parameter with the name "repository" , then the value specified by that parameter will be the repository and system will try to load modules and services from that repository location if it a valid location. hot deployment and hot update will work as usual in this case.

    You will be getting AxisConfiguration corresponding to given inputstream if it is valid , if something goes wrong you will be getting DeploymentException

 protected ArrayList populateService(AxisServiceGroup serviceGroup,
    URL servicesURL,
    String serviceName) throws DeploymentException 
 protected  void prepareRepository(String repositoryName) 
    Creates directories for modules/services, copies configuration xml from class loader if necessary
 protected  void setClassLoaders(String axis2repoURI) throws DeploymentException 
    To set the all the classLoader hierarchy this method can be used , the top most parent is CCL then SCL(system Class Loader) CCL : SCL : : MCCL SCCL : : MCL SCL

    MCCL : module common class loader SCCL : Service common class loader MCL : module class loader SCL : Service class loader

 public  void setConfigContext(ConfigurationContext configContext) 
 public  void setDeployers(Map deployerMap) 
 protected  void setDeploymentFeatures() 
    Sets hotDeployment and hot update.
 public  void setExtensionToDeployerMappingMap(HashMap extensionToDeployerMappingMap) 
 public static  void setWebLocationString(String webLocationString) 
 protected  void startSearch(RepositoryListener listener) 
    Starts the Deployment engine to perform Hot deployment and so on.
 public  void unDeploy()