public abstract class AbstractDeploymentFacility extends Object implements DeploymentFacility, TargetOwner
Code that needs an instance of a remote deployment facility use the
DeploymentFacilityFactory.
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractDeploymentFacility.DFCommandRunner
Defines behavior implemented in the local or remote deployment facility
for actually executing the requested command.
|
| Modifier and Type | Field and Description |
|---|---|
static Logger |
deplLogger |
protected static com.sun.enterprise.util.LocalStringManagerImpl |
localStrings |
STUBS_JARFILENAME| Constructor and Description |
|---|
AbstractDeploymentFacility() |
| Modifier and Type | Method and Description |
|---|---|
javax.enterprise.deploy.spi.TargetModuleID[] |
_listAppRefs(String[] targets)
list all application refs that are present in the provided list of targets
|
javax.enterprise.deploy.spi.TargetModuleID[] |
_listAppRefs(String[] targets,
String state)
list all application refs that are present in the provided list of targets with the specified state
|
javax.enterprise.deploy.spi.TargetModuleID[] |
_listAppRefs(String[] targets,
String state,
String type)
list all application refs that are present in the provided list of targets with the specified state and specified type
|
javax.enterprise.deploy.spi.TargetModuleID[] |
_listAppRefs(javax.enterprise.deploy.spi.Target[] targets,
String state,
String type)
list all application refs that are present in the provided list of targets with the specified state and specified type
|
protected DFProgressObject |
changeAppRef(javax.enterprise.deploy.spi.Target[] targets,
String moduleID,
String commandName,
String action,
Map options) |
protected DFProgressObject |
changeState(javax.enterprise.deploy.spi.Target[] targets,
String moduleID,
String commandName,
String action)
Changes the state of an application.
|
boolean |
connect(ServerConnectionIdentifier targetDAS)
Connects the deployment facility to the DAS.
|
DFProgressObject |
createAppRef(javax.enterprise.deploy.spi.Target[] targets,
String moduleID,
Map options)
Add an application ref on the selected targets
|
javax.enterprise.deploy.spi.Target |
createTarget(String name)
Creates a single
Target with the given name. |
javax.enterprise.deploy.spi.Target[] |
createTargets(String[] targets)
Creates an array of Target objects corresponding to the list of target names.
|
protected String |
createTargetsParam(javax.enterprise.deploy.spi.Target[] targets) |
DFProgressObject |
deleteAppRef(javax.enterprise.deploy.spi.Target[] targets,
String moduleID,
Map options)
remove the application ref for the provided list of targets.
|
DFProgressObject |
deploy(javax.enterprise.deploy.spi.Target[] targets,
org.glassfish.api.deployment.archive.ReadableArchive source,
org.glassfish.api.deployment.archive.ReadableArchive deploymentPlan,
Map deploymentOptions) |
DFProgressObject |
deploy(javax.enterprise.deploy.spi.Target[] targets,
URI source,
URI deploymentPlan,
Map deploymentOptions)
Deploys the application (with optional deployment plan) to the specified
targets with the indicated options.
|
DFProgressObject |
disable(javax.enterprise.deploy.spi.Target[] targets,
String moduleID)
Disables an app on the specified targets.
|
boolean |
disconnect()
Disconnects the deployment facility from the DAS.
|
protected abstract boolean |
doConnect()
Performs any local- or remote-specific work related to connecting to the DAS.
|
protected abstract boolean |
doDisconnect()
Performs any local- or remote-specific work to end the connection to the DAS.
|
String |
downloadFile(File location,
String moduleID,
String moduleURI)
Downloads a particular file from the server repository.
|
DFProgressObject |
enable(javax.enterprise.deploy.spi.Target[] targets,
String moduleID)
Enables an app on the specified targets.
|
String |
exportClientStubs(String appName,
String destDir)
Exports the Client stub jars to the given location.
|
void |
getClientStubs(String location,
String moduleID)
Downloads the client stubs from the server repository.
|
String |
getContextRoot(String moduleName)
Get context root for the module
|
protected abstract AbstractDeploymentFacility.DFCommandRunner |
getDFCommandRunner(String commandName,
Map<String,Object> commandOptions,
String[] operands)
Returns a command runner for the concrete implementation.
|
com.sun.enterprise.util.HostAndPort |
getHostAndPort(String target)
get the host and port information
|
com.sun.enterprise.util.HostAndPort |
getHostAndPort(String target,
boolean securityEnabled)
get the host and port information with security enabled attribute
|
com.sun.enterprise.util.HostAndPort |
getHostAndPort(String target,
String moduleId,
boolean securityEnabled)
get the host and port information with the specified module id and
security enabled attribute
|
javax.enterprise.deploy.shared.ModuleType |
getModuleType(String moduleName)
Get module type for the module
|
List<String> |
getSubModuleInfoForJ2EEApplication(String appName)
Get sub module info for ear
|
protected ServerConnectionIdentifier |
getTargetDAS() |
com.sun.enterprise.util.HostAndPort |
getVirtualServerHostAndPort(String target,
String virtualServer,
boolean securityEnabled)
get the host and port information with the specified virtual server and
security enabled attribute
|
String |
getWebURL(javax.enterprise.deploy.spi.TargetModuleID tmid)
Returns the Web URL for the specified module on the
Target
implied by the TargetModuleID. |
boolean |
isConnected()
Reports whether the deployment facility is connected.
|
javax.enterprise.deploy.spi.TargetModuleID[] |
listAppRefs(String[] targets)
list all application refs that are present in the provided list of targets
|
javax.enterprise.deploy.spi.Target[] |
listReferencedTargets(String appName)
list the referenced targets for application
|
javax.enterprise.deploy.spi.Target[] |
listTargets()
list all targets
|
void |
setWebURL(javax.enterprise.deploy.spi.TargetModuleID tmid,
String webURL)
Sets the Web URL for the specified module on the
Target implied
by the TargetModuleID. |
DFProgressObject |
undeploy(javax.enterprise.deploy.spi.Target[] targets,
String moduleID)
Undeploys an application from specified targets.
|
DFProgressObject |
undeploy(javax.enterprise.deploy.spi.Target[] targets,
String moduleID,
Map undeploymentOptions)
Undeploys an application from specified targets.
|
DFDeploymentStatus |
waitFor(DFProgressObject po)
Convenient method to wait for the operation monitored by the progress
object to complete, returning the final operation status.
|
protected static final com.sun.enterprise.util.LocalStringManagerImpl localStrings
public static final Logger deplLogger
protected abstract AbstractDeploymentFacility.DFCommandRunner getDFCommandRunner(String commandName, Map<String,Object> commandOptions, String[] operands) throws org.glassfish.api.admin.CommandException
commandName - commandOptions - operands - com.sun.enterprise.cli.framework.CommandExceptionorg.glassfish.api.admin.CommandExceptionprotected DFProgressObject changeState(javax.enterprise.deploy.spi.Target[] targets, String moduleID, String commandName, String action)
Used for enable and disable.
targets - targets on which the change should occurmoduleID - name of the module affectedcommandName - enable or disableaction - name enabling or disablingprotected abstract boolean doConnect()
public boolean connect(ServerConnectionIdentifier targetDAS)
connect in interface DeploymentFacilitytargetDAS - the DAS to contactprotected abstract boolean doDisconnect()
public boolean disconnect()
disconnect in interface DeploymentFacilitypublic DFProgressObject createAppRef(javax.enterprise.deploy.spi.Target[] targets, String moduleID, Map options)
DeploymentFacilitycreateAppRef in interface DeploymentFacilitypublic DFProgressObject deleteAppRef(javax.enterprise.deploy.spi.Target[] targets, String moduleID, Map options)
DeploymentFacilitydeleteAppRef in interface DeploymentFacilityprotected DFProgressObject changeAppRef(javax.enterprise.deploy.spi.Target[] targets, String moduleID, String commandName, String action, Map options)
public javax.enterprise.deploy.spi.Target createTarget(String name)
TargetOwnerTarget with the given name.createTarget in interface TargetOwnername - the name of the Target to be returnedpublic javax.enterprise.deploy.spi.Target[] createTargets(String[] targets)
DeploymentFacilitycreateTargets in interface DeploymentFacilitycreateTargets in interface TargetOwnertargets - the names of the targets of interestprotected String createTargetsParam(javax.enterprise.deploy.spi.Target[] targets)
public DFProgressObject deploy(javax.enterprise.deploy.spi.Target[] targets, org.glassfish.api.deployment.archive.ReadableArchive source, org.glassfish.api.deployment.archive.ReadableArchive deploymentPlan, Map deploymentOptions) throws IOException
deploy in interface DeploymentFacilityIOExceptionpublic DFProgressObject deploy(javax.enterprise.deploy.spi.Target[] targets, URI source, URI deploymentPlan, Map deploymentOptions)
deploy in interface DeploymentFacilitytargets - targets to which to deploy the applicationsource - the appdeploymentPlan - the deployment plan (null if not specified)deploymentOptions - options to be applied to the deploymentpublic DFProgressObject disable(javax.enterprise.deploy.spi.Target[] targets, String moduleID)
disable in interface DeploymentFacilitytargets - the targets on which to disable the appmoduleID - the apppublic String downloadFile(File location, String moduleID, String moduleURI) throws IOException
DeploymentFacilitydownloadFile in interface DeploymentFacilitylocation - is the root directory where to place the
downloaded filemoduleID - is the moduleID of the deployed component
to download the file frommoduleURI - is the relative path to the file in the repository
or STUBS_JARFILENAME to download the appclient jar file.IOExceptionpublic DFProgressObject enable(javax.enterprise.deploy.spi.Target[] targets, String moduleID)
enable in interface DeploymentFacilitytargets - the targets on which to enable the appmoduleID - the apppublic boolean isConnected()
isConnected in interface DeploymentFacilitypublic List<String> getSubModuleInfoForJ2EEApplication(String appName) throws IOException
DeploymentFacilitygetSubModuleInfoForJ2EEApplication in interface DeploymentFacilityIOExceptionpublic String getContextRoot(String moduleName) throws IOException
DeploymentFacilitygetContextRoot in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.shared.ModuleType getModuleType(String moduleName) throws IOException
DeploymentFacilitygetModuleType in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.spi.Target[] listTargets()
throws IOException
DeploymentFacilitylistTargets in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.spi.Target[] listReferencedTargets(String appName) throws IOException
DeploymentFacilitylistReferencedTargets in interface DeploymentFacilityIOExceptionpublic void getClientStubs(String location, String moduleID) throws IOException
DeploymentFacilitygetClientStubs in interface DeploymentFacilitylocation - is the root path where to place the
downloaded stubsmoduleID - is the moduleID of the deployed component
to download the stubs forIOExceptionpublic com.sun.enterprise.util.HostAndPort getHostAndPort(String target) throws IOException
DeploymentFacilitygetHostAndPort in interface DeploymentFacilityIOExceptionpublic com.sun.enterprise.util.HostAndPort getHostAndPort(String target, boolean securityEnabled) throws IOException
DeploymentFacilitygetHostAndPort in interface DeploymentFacilityIOExceptionpublic com.sun.enterprise.util.HostAndPort getVirtualServerHostAndPort(String target, String virtualServer, boolean securityEnabled) throws IOException
DeploymentFacilitygetVirtualServerHostAndPort in interface DeploymentFacilityIOExceptionpublic com.sun.enterprise.util.HostAndPort getHostAndPort(String target, String moduleId, boolean securityEnabled) throws IOException
DeploymentFacilitygetHostAndPort in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.spi.TargetModuleID[] listAppRefs(String[] targets) throws IOException
DeploymentFacilitylistAppRefs in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.spi.TargetModuleID[] _listAppRefs(String[] targets) throws IOException
DeploymentFacility_listAppRefs in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.spi.TargetModuleID[] _listAppRefs(String[] targets, String state) throws IOException
DeploymentFacility_listAppRefs in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.spi.TargetModuleID[] _listAppRefs(String[] targets, String state, String type) throws IOException
DeploymentFacility_listAppRefs in interface DeploymentFacilityIOExceptionpublic javax.enterprise.deploy.spi.TargetModuleID[] _listAppRefs(javax.enterprise.deploy.spi.Target[] targets,
String state,
String type)
throws IOException
DeploymentFacility_listAppRefs in interface DeploymentFacilityIOExceptionpublic DFProgressObject undeploy(javax.enterprise.deploy.spi.Target[] targets, String moduleID)
undeploy in interface DeploymentFacilitytargets - the targets from which to undeploy the appmoduleID - the apppublic DFProgressObject undeploy(javax.enterprise.deploy.spi.Target[] targets, String moduleID, Map undeploymentOptions)
undeploy in interface DeploymentFacilitytargets - the targets from which to undeploy the appmoduleID - the appundeploymentOptions - options to control the undeploymentpublic String exportClientStubs(String appName, String destDir) throws IOException
exportClientStubs in interface TargetOwnerappName - The name of the application or module.destDir - The directory into which the stub jar file
should be exported.IOExceptionpublic DFDeploymentStatus waitFor(DFProgressObject po)
waitFor in interface DeploymentFacilitypo - DFProgressObject for the operation of interesttpublic String getWebURL(javax.enterprise.deploy.spi.TargetModuleID tmid)
TargetOwnerTarget
implied by the TargetModuleID.getWebURL in interface TargetOwnerpublic void setWebURL(javax.enterprise.deploy.spi.TargetModuleID tmid,
String webURL)
TargetOwnerTarget implied
by the TargetModuleID.
represents a Web module or submodule on a Target.setWebURL in interface TargetOwnerprotected ServerConnectionIdentifier getTargetDAS()
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.