public SbbUsageMBeanImpl(Class mbeanInterface, SbbNotification notificationSource) throws NotCompliantMBeanException, ClassNotFoundException { super(mbeanInterface,notificationSource); this.service = notificationSource.getService(); this.sbb = notificationSource.getSbb(); }
public void execute() { // remove notification sources for all sbbs traceMBeanImpl .registerNotificationSource(new SbbNotification( serviceComponent.getServiceID(), sbbID)); }
public UsageNotificationManagerMBeanImpl getUsageNotificationManagerMBean( NotificationSource notificationSource) { return notificationManagers.get(((SbbNotification) notificationSource) .getSbb()); }
/** * Creates a new instance of SbbContextImpl * * @param notificationSource */ public SbbContextImpl(SbbObject sbbObject) { this.sbbObject = sbbObject; this.notificationSource = new SbbNotification(getService(), getSbb()); }
public void removeChild(UsageNotificationManagerMBeanImpl child) { try { removeNotificationManager(((SbbNotification) child .getNotificationSource()).getSbb()); } catch (Throwable e) { logger.error(e.getMessage(), e); } }
public void execute() { // remove notification sources for all sbbs traceMBeanImpl .deregisterNotificationSource(new SbbNotification( serviceComponent.getServiceID(), sbbID)); } };
public void removeChild(UsageMBeanImpl usageMBeanImpl) { try { removeUsageParameterSet(((SbbNotification) usageMBeanImpl .getNotificationSource()).getSbb(), usageMBeanImpl .getUsageParameterSet()); } catch (Throwable e) { logger.error(e.getMessage(), e); } }
private SbbNotification parseSbbNotification(String text) { int separator = text.indexOf("sbb=SbbID["); String serviceID = text.substring(0, separator-1); serviceID = serviceID.substring("service=".length()); ComponentIDPropertyEditor cidPropertyEditor = new ComponentIDPropertyEditor(); cidPropertyEditor.setAsText(serviceID); ServiceID service = (ServiceID) cidPropertyEditor.getValue(); String sbbID = text.substring(separator); sbbID = sbbID.substring("sbb=".length()); cidPropertyEditor.setAsText(sbbID); SbbID sbb = (SbbID) cidPropertyEditor.getValue(); return new SbbNotification(service,sbb); }
for (UsageMBeanImpl usageMBeanImpl : usageMBeans.values()) { if (((SbbNotification) usageMBeanImpl.getNotificationSource()) .getSbb().equals(sbbId)) { String name = usageMBeanImpl.getUsageParameterSet(); if (name != null) {
traceMBeanImpl.registerNotificationSource(new SbbNotification( serviceComponent.getServiceID(), sbbID)); .deregisterNotificationSource(new SbbNotification( serviceComponent.getServiceID(), sbbID)); new SbbNotification(serviceComponent.getServiceID(), sbbID)); serviceComponent.getAlarmNotificationSources().putIfAbsent(sbbID, sbbMNotificationSource);
SbbNotification sbbNotification = (SbbNotification) usageMBeanImpl .getNotificationSource(); if (sbbNotification.getSbb().equals(sbbId)) { usageMBeanImpl.resetAllUsageParameters();
.deregisterNotificationSource(new SbbNotification( serviceComponent.getServiceID(), sbbID));
SbbNotification sbbNotification = new SbbNotification(serviceID, sbbId); AbstractUsageParameterSet installedUsageParameterSet = (AbstractUsageParameterSet) AbstractUsageParameterSet.newInstance(usageParameterClass, sbbNotification, name, sleeContainer);