public void registerSipStats(String nodeName, SipStats statsImpl) throws MonitoringRegistrationException {
if (statsImpl == null) {
throw new IllegalArgumentException("registerStats - null stats provided");
}
final StatsHolder sips = getSipStatsHolder();
MonitoredObjectType moType = MonitoredObjectType.newMonitoredObjectType(nodeName, false);
final StatsHolder moNode = sips.addChild(nodeName, moType);
assert (moNode != null) : "MRH:registerStats - Initialization failed for " + nodeName;
moNode.setObjectName(MonitoringObjectNames.getMonitoredObjectName(moType.getTypeName()));
moNode.setDottedName(DottedNameFactory.getDottedName(moType.getTypeName(), sips.getName()));
moNode.setStats(statsImpl);
moNode.setStatsClass(statsImpl.getInterfaceClass());
if (logger.isLoggable(Level.FINE)) {
logger.fine(nodeName + " stats is registered");
}
Layer provider = nodes.get(nodeName);
if(provider != null){
((SipStats) (moNode.getStats())).setStatsProvider(provider);
}
}