KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > monitor > services > ActiveAlarmTableMBean


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.monitor.services;
23
24 import javax.management.ObjectName JavaDoc;
25
26 import org.jboss.monitor.alarm.AlarmTableNotification;
27 import org.jboss.mx.util.ObjectNameFactory;
28 import org.jboss.system.ListenerServiceMBean;
29
30 /**
31  * MBean interface.
32  *
33  * @author <a HREF="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
34  * @version $Revision: 37459 $
35  */

36 public interface ActiveAlarmTableMBean extends ListenerServiceMBean
37 {
38    ObjectName JavaDoc OBJECT_NAME = ObjectNameFactory.create("jboss.monitor:service=ActiveAlarmTable");
39    
40    // Attributes ----------------------------------------------------
41

42    /**
43     * The unique serverId
44     */

45    void setServerId(String JavaDoc serverId);
46    String JavaDoc getServerId();
47
48    /**
49     * The dynamic log level
50     */

51    void setLogLevel(String JavaDoc logLevel);
52    String JavaDoc getLogLevel();
53    
54    /**
55     * The maximum number of alarms to keep, use -1 to disable
56     */

57    void setMaxTableSize(int maxSize);
58    int getMaxTableSize();
59    
60    /**
61     * Number of notifications received.
62     */

63    long getNotificationsReceived();
64
65    /**
66     * Number of active alarms in the table
67     */

68    int getActiveAlarmCount();
69    
70    // Operations ----------------------------------------------------
71

72    /**
73     * Acknowledge all alarms
74     * @return number of acknowledged alarms
75     */

76    int acknowledgeAll(String JavaDoc user, String JavaDoc system);
77
78    /**
79     * Uncknowledge all alarms
80     * @return number of unacknowledged alarms
81     */

82    int unacknowledgeAll(String JavaDoc user, String JavaDoc system);
83
84    /**
85     * Acknowledge an Alarm
86     * @return true if ack was succesful, false otherwise (not in table or acked already)
87     */

88    boolean acknowledge(String JavaDoc alarmId, String JavaDoc user, String JavaDoc system);
89
90    /**
91     * Unacknowledge an Alarm
92     * @return true if unack was succesful, false otherwise (not in table or unacked already)
93     */

94    boolean unacknowledge(String JavaDoc alarmId, String JavaDoc user, String JavaDoc system);
95
96    /**
97     * Gets the ActiveAlarmTable
98     */

99    AlarmTableNotification[] fetchAlarmTable();
100
101    /**
102     * Gets the ActiveAlarmTable as Html
103     */

104    String JavaDoc fetchAlarmTableAsHtml();
105
106 }
107
Popular Tags