| | |
| | | public void initializeAlertHandler(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | sequenceNumber = new AtomicLong(1); |
| | | |
| | | if (configEntry == null) |
| | |
| | | */ |
| | | public void finalizeAlertHandler() |
| | | { |
| | | |
| | | // No action is required. |
| | | } |
| | | |
| | |
| | | */ |
| | | public ObjectName getObjectName() |
| | | { |
| | | |
| | | return objectName; |
| | | } |
| | | |
| | |
| | | public void sendAlertNotification(AlertGenerator generator, String alertType, |
| | | int alertID, String alertMessage) |
| | | { |
| | | |
| | | sendNotification(new Notification(alertType, generator.getClassName(), |
| | | sequenceNumber.getAndIncrement(), |
| | | System.currentTimeMillis(), |
| | |
| | | */ |
| | | public MBeanNotificationInfo[] getNotificationInfo() |
| | | { |
| | | |
| | | ArrayList<MBeanNotificationInfo> notifications = |
| | | new ArrayList<MBeanNotificationInfo>(); |
| | | ConcurrentHashMap<DN,JMXMBean> mBeans = DirectoryServer.getJMXMBeans(); |
| | |
| | | public Attribute getAttribute(String attribute) |
| | | throws AttributeNotFoundException |
| | | { |
| | | |
| | | // There are no attributes for this MBean. |
| | | int msgID = MSGID_CONFIG_JMX_ATTR_NO_ATTR; |
| | | String message = getMessage(msgID, String.valueOf(configEntryDN), |
| | |
| | | public void setAttribute(Attribute attribute) |
| | | throws AttributeNotFoundException, InvalidAttributeValueException |
| | | { |
| | | |
| | | |
| | | // There are no attributes for this MBean. |
| | | int msgID = MSGID_CONFIG_JMX_ATTR_NO_ATTR; |
| | | String message = getMessage(msgID, String.valueOf(configEntryDN), |
| | |
| | | */ |
| | | public AttributeList getAttributes(String[] attributes) |
| | | { |
| | | |
| | | |
| | | // There are no attributes for this MBean. |
| | | return new AttributeList(); |
| | | } |
| | |
| | | */ |
| | | public AttributeList setAttributes(AttributeList attributes) |
| | | { |
| | | |
| | | // There are no attributes for this MBean. |
| | | return new AttributeList(); |
| | | } |
| | |
| | | public Object invoke(String actionName, Object[] params, String[] signature) |
| | | throws MBeanException |
| | | { |
| | | |
| | | // There are no invokable components for this MBean. |
| | | StringBuilder buffer = new StringBuilder(); |
| | | buffer.append(actionName); |
| | |
| | | */ |
| | | public MBeanInfo getMBeanInfo() |
| | | { |
| | | |
| | | return new MBeanInfo(CLASS_NAME, "JMX Alert Handler", |
| | | new MBeanAttributeInfo[0], new MBeanConstructorInfo[0], |
| | | new MBeanOperationInfo[0], getNotificationInfo()); |