com.sun.grizzly.http.servlet.deployer
Class WarDeployer

java.lang.Object
  extended by com.sun.grizzly.http.deployer.Deployer<V,T>
      extended by com.sun.grizzly.http.deployer.FromURIDeployer<WarDeployable,WarDeploymentConfiguration>
          extended by com.sun.grizzly.http.servlet.deployer.WarDeployer

public class WarDeployer
extends FromURIDeployer<WarDeployable,WarDeploymentConfiguration>

FromURIDeployer for War files.

Since:
Sep 28, 2009
Author:
Hubert Iwaniuk, Sebastien Dionne

Constructor Summary
WarDeployer()
           
 
Method Summary
static void cleanup(String folder)
          Will try to delete the folder and his children
protected  Map<GrizzlyAdapter,Set<String>> convert(WarDeployable toDeploy, WarDeploymentConfiguration configuration)
          Converts deployable object to Map of GrizzlyAdapters to paths to deploy to.
protected  WarDeployable fromURI(URI uri, WarDeploymentConfiguration configuration)
          Create object to deploy from uri.
static String getDefaultWorkFolder()
           
protected  WebAppAdapter getWebAppAdapter(ClassLoader webAppCL)
          returns a WebAppAdapter.
 String getWorkFolder()
           
 boolean isForceCleanUp()
           
protected  void setExtraConfig(ServletAdapter sa, WarDeploymentConfiguration configuration)
          Should be used to set configuration that are not in web.xml
 void setForceCleanUp(boolean forceCleanUp)
           
 void setWorkFolder(String workFolder)
           
 
Methods inherited from class com.sun.grizzly.http.deployer.FromURIDeployer
deploy
 
Methods inherited from class com.sun.grizzly.http.deployer.Deployer
deploy, undeploy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarDeployer

public WarDeployer()
Method Detail

convert

protected Map<GrizzlyAdapter,Set<String>> convert(WarDeployable toDeploy,
                                                  WarDeploymentConfiguration configuration)
                                           throws DeployException
Converts deployable object to Map of GrizzlyAdapters to paths to deploy to.

Specified by:
convert in class Deployer<WarDeployable,WarDeploymentConfiguration>
Parameters:
toDeploy - Deployable object to be converted.
configuration - Configuration of deployment.
Returns:
Mapping GrizzlyAdapters to paths to be deployed under (Set of Strings).
Throws:
DeployException - Error while creating adapters.

fromURI

protected WarDeployable fromURI(URI uri,
                                WarDeploymentConfiguration configuration)
                         throws DeployException
Create object to deploy from uri.

Specified by:
fromURI in class FromURIDeployer<WarDeployable,WarDeploymentConfiguration>
Parameters:
uri - of deployable object.
configuration - Configuration of deployment.
Returns:
Deployable object.
Throws:
DeployException - If loading Deployable from uri failed.

getDefaultWorkFolder

public static String getDefaultWorkFolder()

cleanup

public static void cleanup(String folder)
Will try to delete the folder and his children

Parameters:
folder - foldername

getWebAppAdapter

protected WebAppAdapter getWebAppAdapter(ClassLoader webAppCL)
returns a WebAppAdapter. Allow this class to be extends.

Parameters:
webAppCL - the ClassLoader
Returns:
a WebAppAdapter

setExtraConfig

protected void setExtraConfig(ServletAdapter sa,
                              WarDeploymentConfiguration configuration)
Should be used to set configuration that are not in web.xml

Parameters:
sa - ServletAdapter
configuration - configuration

isForceCleanUp

public boolean isForceCleanUp()

setForceCleanUp

public void setForceCleanUp(boolean forceCleanUp)

getWorkFolder

public String getWorkFolder()

setWorkFolder

public void setWorkFolder(String workFolder)


Copyright © 2012 Oracle Corporation. All Rights Reserved.