Package org.glassfish.webservices
Class WebServicesDeployer
- java.lang.Object
-
- org.glassfish.javaee.core.deployment.JavaEEDeployer<WebServicesContainer,WebServicesApplication>
-
- org.glassfish.webservices.WebServicesDeployer
-
- All Implemented Interfaces:
Deployer<WebServicesContainer,WebServicesApplication>
@Service public class WebServicesDeployer extends JavaEEDeployer<WebServicesContainer,WebServicesApplication>
Webservices module deployer. This is loaded from WebservicesContainer- Author:
- Bhakti Mehta, Rama Pulavarthi
-
-
Field Summary
Fields Modifier and Type Field Description static WebServiceDeploymentNotifierdeploymentNotifier-
Fields inherited from class org.glassfish.javaee.core.deployment.JavaEEDeployer
appRegistry, env, habitat, undeploymentVisitor
-
-
Constructor Summary
Constructors Constructor Description WebServicesDeployer()Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclean(DeploymentContext dc)Clean any files and artifacts that were created during the execution of the prepare method.protected voidcleanArtifacts(DeploymentContext deploymentContext)voiddownloadFile(URL httpUrl, File toFile)static WebServiceDeploymentNotifiergetDeploymentNotifier()MetaDatagetMetaData()Returns the meta data assocated with this DeployerWebServicesApplicationload(WebServicesContainer container, DeploymentContext context)Loads a previously prepared application in its execution environment and return a ContractProvider instance that will identify this environment in future communications with the application's container runtime.ObjectloadMetaData(Class type, DeploymentContext dc)Loads the meta date associated with the application.static voidmoveFile(String sourceFile, String destFile)booleanprepare(DeploymentContext dc)Prepares the application bits for running in the application server.URLresolveCatalog(File catalogFile, String wsdlFile, WebService ws)protected voidsetupJaxWSServiceForDeployment(DeploymentContext dc, WebService ws)voidunload(WebServicesApplication container, DeploymentContext context)Unload or stop a previously running application identified with the ContractProvider instance.-
Methods inherited from class org.glassfish.javaee.core.deployment.JavaEEDeployer
generateArtifacts, getApplicationFromApplicationInfo, getCommonClassPath, getModuleClassPath, getObjectType
-
-
-
-
Field Detail
-
deploymentNotifier
public static final WebServiceDeploymentNotifier deploymentNotifier
-
-
Method Detail
-
getDeploymentNotifier
public static WebServiceDeploymentNotifier getDeploymentNotifier()
-
prepare
public boolean prepare(DeploymentContext dc)
Prepares the application bits for running in the application server. For certain cases, this is exploding the jar file to a format the ContractProvider instance is expecting, generating non portable artifacts and other application specific tasks. Failure to prepare should throw an exception which will cause the overall deployment to fail.- Specified by:
preparein interfaceDeployer<WebServicesContainer,WebServicesApplication>- Overrides:
preparein classJavaEEDeployer<WebServicesContainer,WebServicesApplication>- Parameters:
dc- deployment context- Returns:
- true if the prepare phase was successful
-
cleanArtifacts
protected void cleanArtifacts(DeploymentContext deploymentContext) throws DeploymentException
- Throws:
DeploymentException
-
setupJaxWSServiceForDeployment
protected void setupJaxWSServiceForDeployment(DeploymentContext dc, WebService ws) throws DeploymentException
- Throws:
DeploymentException
-
loadMetaData
public Object loadMetaData(Class type, DeploymentContext dc)
Loads the meta date associated with the application.- Specified by:
loadMetaDatain interfaceDeployer<WebServicesContainer,WebServicesApplication>- Overrides:
loadMetaDatain classJavaEEDeployer<WebServicesContainer,WebServicesApplication>- Parameters:
type- type of metadata that this deployer has declared providing.dc- deployment context- Returns:
- the meta-data of type V
-
getMetaData
public MetaData getMetaData()
Returns the meta data assocated with this Deployer- Specified by:
getMetaDatain interfaceDeployer<WebServicesContainer,WebServicesApplication>- Overrides:
getMetaDatain classJavaEEDeployer<WebServicesContainer,WebServicesApplication>- Returns:
- the meta data for this Deployer
-
resolveCatalog
public URL resolveCatalog(File catalogFile, String wsdlFile, WebService ws) throws DeploymentException
- Throws:
DeploymentException
-
moveFile
public static void moveFile(String sourceFile, String destFile) throws IOException
- Throws:
IOException
-
unload
public void unload(WebServicesApplication container, DeploymentContext context)
Description copied from interface:DeployerUnload or stop a previously running application identified with the ContractProvider instance. The container will be stop upon return from this method.- Parameters:
container- instance to be stoppedcontext- of the undeployment
-
clean
public void clean(DeploymentContext dc)
Description copied from class:JavaEEDeployerClean any files and artifacts that were created during the execution of the prepare method.- Specified by:
cleanin interfaceDeployer<WebServicesContainer,WebServicesApplication>- Overrides:
cleanin classJavaEEDeployer<WebServicesContainer,WebServicesApplication>- Parameters:
dc- deployment context
-
load
public WebServicesApplication load(WebServicesContainer container, DeploymentContext context)
Description copied from class:JavaEEDeployerLoads a previously prepared application in its execution environment and return a ContractProvider instance that will identify this environment in future communications with the application's container runtime.- Specified by:
loadin interfaceDeployer<WebServicesContainer,WebServicesApplication>- Overrides:
loadin classJavaEEDeployer<WebServicesContainer,WebServicesApplication>- Parameters:
container- in which the application will residecontext- of the deployment- Returns:
- an ApplicationContainer instance identifying the running application
-
-