com.sun.grizzly.http.deployer
Class Deployer<V extends Deployable,T extends DeploymentConfiguration>

java.lang.Object
  extended by com.sun.grizzly.http.deployer.Deployer<V,T>
Type Parameters:
V - Type of object deployed by this deployer.
T - Type of deployer configuration.
Direct Known Subclasses:
FromURIDeployer

public abstract class Deployer<V extends Deployable,T extends DeploymentConfiguration>
extends Object

Deployer abstraction.

Since:
Sep 17, 2009
Author:
Hubert Iwaniuk

Constructor Summary
Deployer()
           
 
Method Summary
protected abstract  Map<GrizzlyAdapter,Set<String>> convert(V toDeploy, T configuration)
          Converts deployable object to Map of GrizzlyAdapters to paths to deploy to.
 DeploymentID deploy(GrizzlyWebServer gws, V toDeploy, T configuration)
          Deploy Deployable to gws.
 void undeploy(GrizzlyWebServer gws, DeploymentID deploymentId)
          Undeploy previously deployed deployable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Deployer

public Deployer()
Method Detail

deploy

public final DeploymentID deploy(GrizzlyWebServer gws,
                                 V toDeploy,
                                 T configuration)
                          throws DeployException
Deploy Deployable to gws.

Parameters:
gws - Grizzly to deploy to.
toDeploy - Deployable to be deployed.
configuration - Configuration of deployment.
Returns:
Deployment identification.
Throws:
DeployException - Error in deployment.

undeploy

public final void undeploy(GrizzlyWebServer gws,
                           DeploymentID deploymentId)
Undeploy previously deployed deployable.

Parameters:
gws - Grizzly to undeploy from.
deploymentId - Deployment identification.

convert

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

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.


Copyright © 2012 Oracle Corporation. All Rights Reserved.