Interface WebServer

All Superinterfaces:
Component<WebServerDescriptor,ServerEnvironment>

public interface WebServer extends Component<WebServerDescriptor,ServerEnvironment>
Definition of a web server component.
Since:
4.1
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deploy(@NotNull String webAppName, @NotNull String contextName, @NotNull String targetPath, @NotNull String warFilePath)
    Deploys the specified war file to the configured web server
    @NotNull String
    getContextPath(String contextName, String targetPath)
    Returns the path to the directory of the specified web application relative to getWebAppDir().
    @Nullable String
    Returns the internal URL to this web server
    Returns the URL to this web server
    @Nullable String
    Returns the path to the web application directory of this web server
    default @Nullable Path
    getWebAppDir(@NotNull String targetPath)
    Returns the path to a specific web application directory of this web server.
    boolean
    isDeployed(@NotNull String webAppName, @NotNull String contextName, @NotNull String targetPath)
    Returns true if the contextName is deployed and false otherwise.
    boolean
    Returns if the web server is hidden (actually only the internal) if true, then its hidden in the web-server configuration...
    boolean
    Returns if the web server supports deployment of web applications.
    boolean
    Returns if the web server supports querying the deployment state of web applications.
    boolean
    Returns if the web server supports undeployment of web applications.
    void
    undeploy(@NotNull String webAppName, @NotNull String contextName, @NotNull String targetPath)
    Undeploys the specified context

    Methods inherited from interface de.espirit.firstspirit.module.Component

    init, installed, uninstalling, updated
  • Method Details

    • deploy

      void deploy(@NotNull @NotNull String webAppName, @NotNull @NotNull String contextName, @NotNull @NotNull String targetPath, @NotNull @NotNull String warFilePath)
      Deploys the specified war file to the configured web server
      Parameters:
      contextName - name of the target context which will be the beginning of all URL paths for the web application. Examples are "/" for the root web-app (Startpage) or "/fs5staging".
      targetPath - suggested relative target path to the deployment directory in the filesystem, may be used as fallback in cases where the context name cannot be used. Example: "fs5staging"
      webAppName - unique name of the web application, e.g. "fs5root_global"
      warFilePath - path to deployable war file
      Since:
      4.1
    • undeploy

      void undeploy(@NotNull @NotNull String webAppName, @NotNull @NotNull String contextName, @NotNull @NotNull String targetPath)
      Undeploys the specified context
      Parameters:
      contextName - name of the target context, e.g. "/fs5root"
      targetPath - relative target path to the deployment directory in the file system, may be used as fallback
      webAppName - unique name of the web application, e.g. "fs5root_global"
      Since:
      4.1
    • isDeployed

      boolean isDeployed(@NotNull @NotNull String webAppName, @NotNull @NotNull String contextName, @NotNull @NotNull String targetPath)
      Returns true if the contextName is deployed and false otherwise. If the server does not support querying the deployment state (i.e. supportsDeployState() is false), this method returns always false.
      Parameters:
      contextName - name of the target context, e.g. "/fs5root"
      webAppName - unique name of the web application, e.g. "fs5root_global"
      targetPath - relative target path to the deployment directory in the file system, may be used as fallback
      Returns:
      true if the contextName is deployed and false otherwise
      Since:
      4.1
    • supportsDeployState

      boolean supportsDeployState()
      Returns if the web server supports querying the deployment state of web applications.
      Returns:
      true, if deploy is supported, and false otherwise
      Since:
      4.1
    • supportsDeploy

      boolean supportsDeploy()
      Returns if the web server supports deployment of web applications.
      Returns:
      true, if deploy is supported, and false otherwise
      Since:
      4.1
    • supportsUndeploy

      boolean supportsUndeploy()
      Returns if the web server supports undeployment of web applications.
      Returns:
      true, if undeployment is supported, and false otherwise
      Since:
      4.1
    • isHidden

      boolean isHidden()
      Returns if the web server is hidden (actually only the internal) if true, then its hidden in the web-server configuration...
      Returns:
      Returns if the web server is hidden (actually only the internal)
      Since:
      4.1
    • getURL

      String getURL()
      Returns the URL to this web server
      Returns:
      URL to this web server
      Since:
      4.1
    • getInternalURL

      @Nullable @Nullable String getInternalURL()
      Returns the internal URL to this web server
      Returns:
      internal URL to this web server, may be null if not configured.
      Since:
      5.2.709
    • getWebAppDir

      @Nullable @Nullable String getWebAppDir()
      Returns the path to the web application directory of this web server
      Returns:
      path to the web application directory of this web server or null if not available.
      Since:
      4.1
    • getWebAppDir

      @Nullable default @Nullable Path getWebAppDir(@NotNull @NotNull String targetPath)
      Returns the path to a specific web application directory of this web server.
      Parameters:
      targetPath - target path relative to the web-app base directory returned by getWebAppDir(). The path has been initially specified when calling deploy(String, String, String, String).
      Returns:
      path to the specific web application directory of this web server or null if not available.
      Since:
      5.2.231004
    • getContextPath

      @NotNull @NotNull String getContextPath(String contextName, String targetPath)
      Returns the path to the directory of the specified web application relative to getWebAppDir(). The returned path might differ from the specified target path. For contextName "/" the return value may be "ROOT" instead of targetPath
      Parameters:
      contextName - name of the target context, e.g. "/fs5root"
      targetPath - relative target path to the deployment directory in the file system, may be used as fallback
      Returns:
      relative target path in the file system, may be used as fallback
      Since:
      5.2.511