Interface EmbeddedDeployer


@Contract public interface EmbeddedDeployer
Service to deploy applications to the embedded server.
Author:
Jerome Dochez
  • Method Summary

    Modifier and Type
    Method
    Description
    deploy(File archive, org.glassfish.api.deployment.DeployCommandParameters params)
    Deploys a file or directory to the servers passing the deployment command parameters Starts the server if it is not started yet.
    deploy(org.glassfish.api.deployment.archive.ReadableArchive archive, org.glassfish.api.deployment.DeployCommandParameters params)
    Deploys an archive abstraction to the servers passing the deployment command parameters
    Returns the location of the applications directory, where deployed applications are saved.
    Returns the location of the auto-deploy directory.
    void
    setAutoDeploy(boolean flag)
    Enables or disables the auto-deployment feature
    void
    undeploy(String name, org.glassfish.api.deployment.UndeployCommandParameters params)
    Undeploys a previously deployed application
    void
    Undeploys all deployed applications.
  • Method Details

    • getApplicationsDir

      File getApplicationsDir()
      Returns the location of the applications directory, where deployed applications are saved.
      Returns:
      the deployed application directory.
    • getAutoDeployDir

      File getAutoDeployDir()
      Returns the location of the auto-deploy directory.
      Returns:
      the auto-deploy directory
    • setAutoDeploy

      void setAutoDeploy(boolean flag)
      Enables or disables the auto-deployment feature
      Parameters:
      flag - set to true to enable, false to disable
    • deploy

      String deploy(File archive, org.glassfish.api.deployment.DeployCommandParameters params)
      Deploys a file or directory to the servers passing the deployment command parameters Starts the server if it is not started yet.
      Parameters:
      archive - archive or directory of the application
      params - deployment command parameters
      Returns:
      the deployed application name
    • deploy

      String deploy(org.glassfish.api.deployment.archive.ReadableArchive archive, org.glassfish.api.deployment.DeployCommandParameters params)
      Deploys an archive abstraction to the servers passing the deployment command parameters
      Parameters:
      archive - archive or directory of the application
      params - deployment command parameters
      Returns:
      the deployed application name
    • undeploy

      void undeploy(String name, org.glassfish.api.deployment.UndeployCommandParameters params)
      Undeploys a previously deployed application
      Parameters:
      name - name returned by {@link EmbeddedDeployer#deploy(File, org.glassfish.api.deployment.DeployCommandParameters}
      params - the undeployment parameters, can be null for default values
    • undeployAll

      void undeployAll()
      Undeploys all deployed applications.