Methods Summary |
---|
protected void | addInstance(java.lang.String instanceName)
instances.add(instanceName);
|
protected void | addServiceConfig(java.lang.String instanceName)
String instanceRepDir = repositoryDir + File.separator +
repositoryName ;
if ((!(instanceName.equals(Constants.SERVER))) &&
(!(type.equals(TargetType.INSTANCE)))){
// for example in case of node agent this value would be
//nodeagents/na1/instance1
instanceRepDir = instanceRepDir + File.separator + instanceName;
}
ServiceConfig instanceConfig = ServiceConfigFactory.getInstance().
getServiceConfig(context.isLocal(), instanceRepDir,
instanceName);
if(instanceConfig != null)
serviceConfigs.add(instanceConfig);
|
protected void | createTarget()
setExecutionContext();
initLogger();
determineTargetDetails();
createTargetObject();
|
protected void | createTargetObject()
reportTarget = new ReportTarget(repositoryDir, repositoryName, target,
type, instances, local);
|
protected abstract void | determineInstances()
|
protected abstract void | determineRepositoryDetails()
|
protected void | determineServiceConfigs()
if(instances != null) {
Iterator<String> iterator = instances.iterator();
while(iterator.hasNext()) {
addServiceConfig(iterator.next());
}
}
|
protected void | determineTargetDetails()
//determineTargetDir();
determineTargetType();
determineRepositoryDetails();
determineInstances();
determineServiceConfigs();
logger.log(Level.FINE,"diagnostic-service.target_details",
new Object[] {target, repositoryDir, type, instances});
|
protected abstract void | determineTargetType()
|
public ExecutionContext | getExecutionContext()
return context;
|
private java.util.logging.Logger | getLogger()
return logger;
|
public java.util.List | getServiceConfigs()
return serviceConfigs;
|
private void | initLogger()
logger = context.getLogger();
|
public ReportTarget | resolve()
if(validateTarget()) {
createTarget();
return reportTarget;
}
throw new InvalidTargetException(" Unable to resolve target : " + target);
|
protected abstract void | setExecutionContext()
|
protected void | setTargetType(TargetType type)
this.type = type;
|
public abstract boolean | validateTarget()
|