|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.deployment.client.AbstractDeploymentFacility
public abstract class AbstractDeploymentFacility
Provides common behavior for the local and remote deployment facilities.
Code that needs an instance of a remote deployment facility use the
DeploymentFacilityFactory.
| Nested Class Summary | |
|---|---|
static interface |
AbstractDeploymentFacility.DFCommandRunner
Defines behavior implemented in the local or remote deployment facility for actually executing the requested command. |
| Field Summary | |
|---|---|
protected static LocalStringManagerImpl |
localStrings
|
| Fields inherited from interface org.glassfish.deployment.client.DeploymentFacility |
|---|
STUBS_JARFILENAME |
| Constructor Summary | |
|---|---|
AbstractDeploymentFacility()
|
|
| Method Summary | |
|---|---|
TargetModuleID[] |
_listAppRefs(String[] targets)
list all application refs that are present in the provided list of targets |
TargetModuleID[] |
_listAppRefs(String[] targets,
String state)
list all application refs that are present in the provided list of targets with the specified state |
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 |
TargetModuleID[] |
_listAppRefs(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(Target[] targets,
String moduleID,
String commandName,
String action,
Map options)
|
protected DFProgressObject |
changeState(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(Target[] targets,
String moduleID,
Map options)
Add an application ref on the selected targets |
Target |
createTarget(String name)
Creates a single Target with the given name. |
Target[] |
createTargets(String[] targets)
Creates an array of Target objects corresponding to the list of target names. |
protected String |
createTargetsParam(Target[] targets)
|
DFProgressObject |
deleteAppRef(Target[] targets,
String moduleID,
Map options)
remove the application ref for the provided list of targets. |
DFProgressObject |
deploy(Target[] targets,
ReadableArchive source,
ReadableArchive deploymentPlan,
Map deploymentOptions)
|
DFProgressObject |
deploy(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(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(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. |
HostAndPort |
getHostAndPort(String target)
get the host and port information |
HostAndPort |
getHostAndPort(String target,
boolean securityEnabled)
get the host and port information with security enabled attribute |
HostAndPort |
getHostAndPort(String target,
String moduleId,
boolean securityEnabled)
get the host and port information with the specified module id and security enabled attribute |
ModuleType |
getModuleType(String moduleName)
Get module type for the module |
List<String> |
getSubModuleInfoForJ2EEApplication(String appName)
Get sub module info for ear |
protected ServerConnectionIdentifier |
getTargetDAS()
|
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(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. |
TargetModuleID[] |
listAppRefs(String[] targets)
list all application refs that are present in the provided list of targets |
Target[] |
listReferencedTargets(String appName)
list the referenced targets for application |
Target[] |
listTargets()
list all targets |
void |
setWebURL(TargetModuleID tmid,
String webURL)
Sets the Web URL for the specified module on the Target implied
by the TargetModuleID. |
DFProgressObject |
undeploy(Target[] targets,
String moduleID)
Undeploys an application from specified targets. |
DFProgressObject |
undeploy(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final LocalStringManagerImpl localStrings
| Constructor Detail |
|---|
public AbstractDeploymentFacility()
| Method Detail |
|---|
protected abstract AbstractDeploymentFacility.DFCommandRunner getDFCommandRunner(String commandName,
Map<String,Object> commandOptions,
String[] operands)
throws CommandException
commandName - commandOptions - operands -
com.sun.enterprise.cli.framework.CommandException
CommandException
protected DFProgressObject changeState(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 disabling
protected abstract boolean doConnect()
public boolean connect(ServerConnectionIdentifier targetDAS)
connect in interface DeploymentFacilitytargetDAS - the DAS to contact
protected abstract boolean doDisconnect()
public boolean disconnect()
disconnect in interface DeploymentFacility
public DFProgressObject createAppRef(Target[] targets,
String moduleID,
Map options)
DeploymentFacility
createAppRef in interface DeploymentFacility
public DFProgressObject deleteAppRef(Target[] targets,
String moduleID,
Map options)
DeploymentFacility
deleteAppRef in interface DeploymentFacility
protected DFProgressObject changeAppRef(Target[] targets,
String moduleID,
String commandName,
String action,
Map options)
public Target createTarget(String name)
TargetOwnerTarget with the given name.
createTarget in interface TargetOwnername - the name of the Target to be returned
public Target[] createTargets(String[] targets)
DeploymentFacility
createTargets in interface DeploymentFacilitycreateTargets in interface TargetOwnertargets - the names of the targets of interest
protected String createTargetsParam(Target[] targets)
public DFProgressObject deploy(Target[] targets,
ReadableArchive source,
ReadableArchive deploymentPlan,
Map deploymentOptions)
throws IOException
deploy in interface DeploymentFacilityIOException
public DFProgressObject deploy(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 deployment
public DFProgressObject disable(Target[] targets,
String moduleID)
disable in interface DeploymentFacilitytargets - the targets on which to disable the appmoduleID - the app
public String downloadFile(File location,
String moduleID,
String moduleURI)
throws IOException
DeploymentFacility
downloadFile 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.
IOException
public DFProgressObject enable(Target[] targets,
String moduleID)
enable in interface DeploymentFacilitytargets - the targets on which to enable the appmoduleID - the app
public boolean isConnected()
isConnected in interface DeploymentFacility
public List<String> getSubModuleInfoForJ2EEApplication(String appName)
throws IOException
DeploymentFacility
getSubModuleInfoForJ2EEApplication in interface DeploymentFacilityIOException
public String getContextRoot(String moduleName)
throws IOException
DeploymentFacility
getContextRoot in interface DeploymentFacilityIOException
public ModuleType getModuleType(String moduleName)
throws IOException
DeploymentFacility
getModuleType in interface DeploymentFacilityIOException
public Target[] listTargets()
throws IOException
DeploymentFacility
listTargets in interface DeploymentFacilityIOException
public Target[] listReferencedTargets(String appName)
throws IOException
DeploymentFacility
listReferencedTargets in interface DeploymentFacilityIOException
public void getClientStubs(String location,
String moduleID)
throws IOException
DeploymentFacility
getClientStubs in interface DeploymentFacilitylocation - is the root path where to place the
downloaded stubsmoduleID - is the moduleID of the deployed component
to download the stubs for
IOException
public HostAndPort getHostAndPort(String target)
throws IOException
DeploymentFacility
getHostAndPort in interface DeploymentFacilityIOException
public HostAndPort getHostAndPort(String target,
boolean securityEnabled)
throws IOException
DeploymentFacility
getHostAndPort in interface DeploymentFacilityIOException
public HostAndPort getVirtualServerHostAndPort(String target,
String virtualServer,
boolean securityEnabled)
throws IOException
DeploymentFacility
getVirtualServerHostAndPort in interface DeploymentFacilityIOException
public HostAndPort getHostAndPort(String target,
String moduleId,
boolean securityEnabled)
throws IOException
DeploymentFacility
getHostAndPort in interface DeploymentFacilityIOException
public TargetModuleID[] listAppRefs(String[] targets)
throws IOException
DeploymentFacility
listAppRefs in interface DeploymentFacilityIOException
public TargetModuleID[] _listAppRefs(String[] targets)
throws IOException
DeploymentFacility
_listAppRefs in interface DeploymentFacilityIOException
public TargetModuleID[] _listAppRefs(String[] targets,
String state)
throws IOException
DeploymentFacility
_listAppRefs in interface DeploymentFacilityIOException
public TargetModuleID[] _listAppRefs(String[] targets,
String state,
String type)
throws IOException
DeploymentFacility
_listAppRefs in interface DeploymentFacilityIOException
public TargetModuleID[] _listAppRefs(Target[] targets,
String state,
String type)
throws IOException
DeploymentFacility
_listAppRefs in interface DeploymentFacilityIOException
public DFProgressObject undeploy(Target[] targets,
String moduleID)
undeploy in interface DeploymentFacilitytargets - the targets from which to undeploy the appmoduleID - the app
public DFProgressObject undeploy(Target[] targets,
String moduleID,
Map undeploymentOptions)
undeploy in interface DeploymentFacilitytargets - the targets from which to undeploy the appmoduleID - the appundeploymentOptions - options to control the undeployment
public 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 interestt
public String getWebURL(TargetModuleID tmid)
TargetOwnerTarget
implied by the TargetModuleID.
getWebURL in interface TargetOwner
public void setWebURL(TargetModuleID tmid,
String webURL)
TargetOwnerTarget implied
by the TargetModuleID.
represents a Web module or submodule on a Target.
setWebURL in interface TargetOwnerprotected ServerConnectionIdentifier getTargetDAS()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||