com.sun.enterprise.admin.cli.embeddable
Class DeployerImpl
java.lang.Object
com.sun.enterprise.admin.cli.embeddable.DeployerImpl
- All Implemented Interfaces:
- Deployer
@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class DeployerImpl
- extends java.lang.Object
- implements Deployer
This is an implementation of Deployer.
Unlike the other EmbeddedDeployer, this deployer uses admin command execution
framework to execute the underlying command, as a result we don't by-pass things like command replication code.
- Author:
- Sanjeeb.Sahoo@Sun.COM
|
Field Summary |
(package private) org.jvnet.hk2.component.Habitat |
habitat
|
private static java.util.logging.Logger |
logger
|
|
Method Summary |
private java.io.File |
convertToFile(java.net.URI archive)
|
private void |
copyStream(java.io.InputStream in,
java.io.OutputStream out)
|
private java.io.File |
createFile(java.io.InputStream in)
|
java.lang.String |
deploy(java.io.File file,
java.lang.String... params)
|
java.lang.String |
deploy(java.io.InputStream is,
java.lang.String... params)
|
java.lang.String |
deploy(java.net.URI archive,
java.lang.String... params)
|
private void |
extractPayload(Payload.Outbound outboundPayload,
ActionReport actionReport,
java.io.File retrieveDir)
Extract the payload (client side stub jar files) to the directory specified via
--retrieve option. |
java.util.Collection<java.lang.String> |
getDeployedApplications()
|
void |
undeploy(java.lang.String appName,
java.lang.String... params)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final java.util.logging.Logger logger
habitat
org.jvnet.hk2.component.Habitat habitat
DeployerImpl
public DeployerImpl()
deploy
public java.lang.String deploy(java.net.URI archive,
java.lang.String... params)
throws GlassFishException
- Specified by:
deploy in interface Deployer
- Throws:
GlassFishException
deploy
public java.lang.String deploy(java.io.File file,
java.lang.String... params)
throws GlassFishException
- Specified by:
deploy in interface Deployer
- Throws:
GlassFishException
deploy
public java.lang.String deploy(java.io.InputStream is,
java.lang.String... params)
throws GlassFishException
- Specified by:
deploy in interface Deployer
- Throws:
GlassFishException
undeploy
public void undeploy(java.lang.String appName,
java.lang.String... params)
throws GlassFishException
- Specified by:
undeploy in interface Deployer
- Throws:
GlassFishException
getDeployedApplications
public java.util.Collection<java.lang.String> getDeployedApplications()
throws GlassFishException
- Specified by:
getDeployedApplications in interface Deployer
- Throws:
GlassFishException
convertToFile
private java.io.File convertToFile(java.net.URI archive)
throws java.io.IOException
- Throws:
java.io.IOException
createFile
private java.io.File createFile(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
copyStream
private void copyStream(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
extractPayload
private void extractPayload(Payload.Outbound outboundPayload,
ActionReport actionReport,
java.io.File retrieveDir)
- Extract the payload (client side stub jar files) to the directory specified via
--retrieve option.
- Parameters:
outboundPayload - Payload to be extractedactionReport - ActionReport of the deploy command.retrieveDir - Directory where the payload should be extracted to.
Copyright © 2012 GlassFish Community. All Rights Reserved.