pwcRequestStatsImpl = new PWCRequestStatsImpl(
getServerContext().getDefaultDomainName());
virtualServer.setPWCRequestStatsImpl(pwcRequestStatsImpl);
}
HTTPListenerStatsImpl httpStats;
MonitoringRegistry mReg = getServerContext().getMonitoringRegistry();
String vsId = virtualServer.getID();
if (isTomcatUsingDefaultDomain()) {
httpStats = new HTTPListenerStatsImpl(
getServerContext().getDefaultDomainName(),port);
} else {
httpStats = new HTTPListenerStatsImpl(vsId,port);
}
try {
mReg.registerHttpListenerStats(httpStats, httpListenerId, vsId, null);
pwcRequestStatsImpl.addHttpListenerStats(httpStats);