public ProfileLocator getDefaultProfile(RequestContext context,
String locatorName) throws ProfilerException
{
ProfilingRule rule = getRuleForPrincipal(DEFAULT_RULE_PRINCIPAL,
locatorName);
if (null == rule)
{
log.warn("Could not find profiling rule for principal: "
+ DEFAULT_RULE_PRINCIPAL);
rule = this.getDefaultRule();
}
if (null == rule)
{
String msg = "Couldn't find any profiling rules including default rule for principal "
+ DEFAULT_RULE_PRINCIPAL;
log.error(msg);
throw new ProfilerException(msg);
}
// create a profile locator for given rule
return rule.apply(context, this);
}