|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Deployer
Deployer service for GlassFish. Using this service, one can deploy and undeploy applications. It accepts URI as an input for deployment and hence is very easily extensible. User can install their own custom URL handler in Java runtime and create URIs with their custom scheme and pass them to deploy method.
GlassFish.getDeployer(),
URL.setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory)| Method Summary | |
|---|---|
String |
deploy(File file,
String... params)
Deploys an application identified by a file. |
String |
deploy(InputStream is,
String... params)
Deploys an application from the specified InputStream object. |
String |
deploy(URI archive,
String... params)
Deploys an application identified by a URI. |
Collection<String> |
getDeployedApplications()
Return names of all the deployed applications. |
void |
undeploy(String appName,
String... params)
Undeploys an application from GlassFish
This method takes a var-arg argument for the undeployment options. |
| Method Detail |
|---|
String deploy(URI archive,
String... params)
throws GlassFishException
deployer.deploy(new URI("http://acme.com/foo.war"));
deployer.deploy(new URI("http://acme.com/foo.war"),
"--name", "bar", "--force", "true", "--create-tables", "true");
archive - URI identifying the application to be deployed.params - Optional list of deployment options.
GlassFishException
String deploy(File file,
String... params)
throws GlassFishException
deploy(file.toURI, params).
file - File or directory identifying the application to be deployed.params - Optional list of deployment options.
GlassFishException
String deploy(InputStream is,
String... params)
throws GlassFishException
InputStream object.
The input stream is closed when this method completes, even if an exception is thrown.
is - InputStream used to read the content of the application.params - Optional list of deployment options.
GlassFishException
void undeploy(String appName,
String... params)
throws GlassFishException
GlassFish
This method takes a var-arg argument for the undeployment options. Any option that's applicable
to "asadmin undeploy" command is also applicable here with same semantics. Please refer to GlassFish
deployment guide for all available options.
Example:
deployer.undeploy("foo", "--drop-tables", "true");
appName - Identifier of the application to be undeployed.params - Undeployment options.
GlassFishException
Collection<String> getDeployedApplications()
throws GlassFishException
GlassFishException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||