org.springframework.osgi.web.extender.deployer
Interface WarDeployer

All Known Implementing Classes:
AbstractWarDeployer, JettyWarDeployer, TomcatWarDeployer

public interface WarDeployer

OSGi WAR bundle deployer. Handles the installing and uninstalling of the OSGi bundle as an web application and deals with any container specific integration.

Implementations are free to use specific environments for the actual deployment process, such as Apache Tomcat, OSGi HttpService, Jetty or other web containers.

As the war listener handles the detection, start up and shutdown of the bundles, the deployer should be concerned only with the deployment process of the bundle. It is recommended to thrown exceptions (if any) in unwrapped as the extender will take care of logging and wrapping.

Author:
Costin Leau
See Also:
ContextPathStrategy

Method Summary
 void deploy(Bundle bundle, String contextPath)
          Deploys the given bundle as a WAR using the given context path.
 void undeploy(Bundle bundle, String contextPath)
          Un-deploys the given bundle from the given context path.
 

Method Detail

deploy

void deploy(Bundle bundle,
            String contextPath)
            throws Exception
Deploys the given bundle as a WAR using the given context path. Traditionally, a WAR means the given bundle contains a WEB-INF/web.xml file in its bundle space. However, implementations can chose to create a synthetic WAR or use other configuration files instead.

Parameters:
bundle - war bundle
contextPath - the war context path
Throws:
Exception - if something went wrong during deployment

undeploy

void undeploy(Bundle bundle,
              String contextPath)
              throws Exception
Un-deploys the given bundle from the given context path. Undeploying a WAR makes sense only if it has been previously deployed.

Parameters:
bundle - war bundle
contextPath - the war context path
Throws:
Exception - if something went wrong during undeployment


Copyright © 2006-2008 Spring Framework. All Rights Reserved.