/** * * @throws ManagementException */ protected void ensureMBeanIsNotClosed() throws ManagementException { if (closed) { throw new ManagementException("closed"); } }
public void handleNotification(Notification notification, Object handback) { if (notification instanceof SleeStateChangeNotification) { SleeStateChangeNotification sleeStateChangeNotification = (SleeStateChangeNotification) notification; sleeState = sleeStateChangeNotification.getNewState(); } }
/** * @param serviceID * @throws ManagementException * @throws InvalidStateException * @throws UnrecognizedServiceException * @throws NullPointerException */ private void activateService(ServiceID serviceID) throws Exception { serviceManagementMBean.activate(serviceID); }
private void generateNotification(AlarmPlaceHolder aph, boolean isCleared) { Alarm alarm = aph.getAlarm(); AlarmLevel generalLevel = isCleared ? AlarmLevel.CLEAR : alarm.getAlarmLevel(); AlarmNotification notification = new AlarmNotification(aph.getNotificationSource().getNotificationSource().getAlarmNotificationType(), this, alarm.getAlarmID(), aph.getNotificationSource() .getNotificationSource(), alarm.getAlarmType(), alarm.getInstanceID(), generalLevel, alarm.getMessage(), alarm.getCause(), aph.getNotificationSource().getNextSequence(), System .currentTimeMillis()); super.sendNotification(notification); }
@Override public void invoke() throws Exception { getDeploymentMBean().uninstall(new DeployableUnitID(getDuURL())); }
/** * Creates a new instance of SbbContextImpl * * @param notificationSource */ public SbbContextImpl(SbbObject sbbObject) { this.sbbObject = sbbObject; this.notificationSource = new SbbNotification(getService(), getSbb()); }
public SbbUsageMBeanImpl(Class mbeanInterface, SbbNotification notificationSource) throws NotCompliantMBeanException, ClassNotFoundException { super(mbeanInterface,notificationSource); this.service = notificationSource.getService(); this.sbb = notificationSource.getSbb(); }
public ComponentID[] getComponents() { return deployableUnitDescriptor.getComponents(); }
public String getURL() { return deployableUnitDescriptor.getURL(); }
@Override public int hashCode() { return ((notificationSource == null) ? 0 : notificationSource.hashCode()); }
@Override public int hashCode() { return id.hashCode(); }
private void deactivateService(ServiceID serviceID) throws Exception { serviceManagementMBean.deactivate(serviceID); }
public Date getDeploymentDate() { return deployableUnitDescriptor.getDeploymentDate(); }
public UsageNotificationManagerMBeanImpl getUsageNotificationManagerMBean( NotificationSource notificationSource) { return notificationManagers.get(((SbbNotification) notificationSource) .getSbb()); }
private String getRADefaultEntityName(ResourceAdaptorID raid) throws Exception { ResourceAdaptorDescriptor rad = (ResourceAdaptorDescriptor)sleeDeploymentMBean.getDescriptor(raid); String raEntityName = rad.getName() + "-ra"; return raEntityName; }
/** * This method is requried - in case component is removed on call to method with its noti source we must throw unknown notification source exception - even thought alarms MAY be present? * @throws UnrecognizedNotificationSourceException */ private void mandateSource(NotificationSource src) throws UnrecognizedNotificationSourceException { if(!traceMBean.isNotificationSourceDefined(src)) { throw new UnrecognizedNotificationSourceException("Notification source is not present: "+src); } }
public void createResourceAdaptorEntityLink(String link, String entityName) throws ManagementException { if (this.resourceAdaptorEntityLinks.containsKey(link)) throw new ManagementException("Entity Link already exist!"); this.resourceAdaptorEntityLinks.put(link, entityName); }
private SbbEntity getSbbEntityById(String sbbeId) throws ManagementException { try { return SbbEntityFactory.getSbbEntityWithoutLock(sbbeId); } catch (Exception e) { throw new ManagementException("", e); } }
private org.mobicents.slee.container.eventrouter.stats.EventRouterStatistics getEventRouterStatistics() throws ManagementException { if (eventRouter == null) { throw new ManagementException("router not set"); } if (eventRouter.getEventRouterStatistics() == null) { throw new ManagementException("router stats not available"); } return eventRouter.getEventRouterStatistics(); }
public ObjectName getSbbUsageMBean(SbbID sbbId) throws NullPointerException, UnrecognizedSbbException, InvalidArgumentException, ManagementException { try { return _getSbbUsageMBean(sbbId, null); } catch (UnrecognizedUsageParameterSetNameException e) { throw new ManagementException( "default usage parameter name not found", e); } }