DeploymentTargetFactoryPEImplpublic class DeploymentTargetFactoryPEImpl extends DeploymentTargetFactory Target factory used for PE case. In case target name is domain a GroupDeploymentTarget
that acts as an aggregation of servers in the domain is returned. |
Fields Summary |
---|
private static final com.sun.enterprise.admin.target.TargetType[] | VALID_DEPLOYMENT_TYPES |
Constructors Summary |
---|
public DeploymentTargetFactoryPEImpl()Creates a new instance of DeploymentTargetFactoryPEImpl
|
Methods Summary |
---|
public DeploymentTarget | getTarget(com.sun.enterprise.config.ConfigContext configContext, java.lang.String domainName, java.lang.String targetName)Returns the Deployment target for the targetName. If targetName is default_target "domain" then a
GroupDeploymentTarget representing a collection of all servers in this domain is returned.
This method is called from Association/DisassociationPhase
and Start/StopPhase. For PE, when no target name is specified in the deployment commands
association/disassociation/start/stop need to execute for all servers.
try{
//parse the given target and ensure that it is a valid server instance. Server instance
//is the only valid target type for PE.
final Target target = TargetBuilder.INSTANCE.createTarget(VALID_DEPLOYMENT_TYPES,
targetName, configContext);
if (targetName == null) {
targetName = target.getName();
}
return new ServerDeploymentTarget(configContext , domainName, targetName);
} catch(Throwable t){
throw new IASDeploymentException("Error:" + t.getMessage(), t);
}
| public DeploymentTarget | getTarget(com.sun.enterprise.config.ConfigContext configContext, java.lang.String domainName)Returns the default target. Used incase when deployment command doesnt
get the target name from user
return getTarget(configContext, domainName, null);
| public com.sun.enterprise.admin.target.TargetType[] | getValidDeploymentTargetTypes()
return this.VALID_DEPLOYMENT_TYPES;
|
|