org.jboss.monitor.services
Class ActiveAlarmTable

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.system.ListenerServiceMBeanSupport
              extended by org.jboss.monitor.services.ActiveAlarmTable
All Implemented Interfaces:
EventListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.management.NotificationListener, ActiveAlarmTableMBean, org.jboss.system.ListenerServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class ActiveAlarmTable
extends org.jboss.system.ListenerServiceMBeanSupport
implements ActiveAlarmTableMBean

ActiveAlarmTable

Version:
$Revision: 57210 $
Author:
Dimitris Andreadis

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.system.ListenerServiceMBeanSupport
org.jboss.system.ListenerServiceMBeanSupport.SubscriptionInfo
 
Field Summary
protected static org.jboss.logging.DynamicLogger log
          DynamicLogger
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.monitor.services.ActiveAlarmTableMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ListenerServiceMBean
SL_FILTER_ELEMENT, SL_FILTER_FACTORY_ATTRIBUTE, SL_MBEAN_ELEMENT, SL_MBEAN_HANDBACK_ATTRIBUTE, SL_MBEAN_NAME_ATTRIBUTE, SL_NOTIFICATION_ELEMENT, SL_NOTIFICATION_TYPE_ATTRIBUTE, SL_ROOT_ELEMENT
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
ActiveAlarmTable()
          CTOR
 
Method Summary
 boolean acknowledge(String alarmId, String user, String system)
          Acknowledge an Alarm
 int acknowledgeAll(String user, String system)
          Acknowledge all
 AlarmTableNotification[] fetchAlarmTable()
          Gets the ActiveAlarmTable
 String fetchAlarmTableAsHtml()
          Gets the ActiveAlarmTable as Html
 int getActiveAlarmCount()
          Number of active alarms in the table
 String getLogLevel()
           
 int getMaxTableSize()
           
 long getNotificationsReceived()
          Number of notifications received.
 String getServerId()
           
 void handleNotification2(javax.management.Notification notification, Object handback)
          Overriden to add handling!
 void setLogLevel(String logLevel)
          The dynamic log level
 void setMaxTableSize(int maxSize)
          The maximum number of alarms to keep, use -1 to disable
 void setServerId(String serverId)
          The unique serverId
 void startService()
          Start
 void stopService()
          Stop
protected  String substNewLines(Object input)
          Convert every occurence of "\n" to "
"
 boolean unacknowledge(String alarmId, String user, String system)
          Unacknowledge an Alarm
 int unacknowledgeAll(String user, String system)
          Uncknowledge all
 
Methods inherited from class org.jboss.system.ListenerServiceMBeanSupport
handleNotification, setSubscriptionList, subscribe, subscribe, subscribe, unsubscribe
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ListenerServiceMBean
setSubscriptionList
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

log

protected static final org.jboss.logging.DynamicLogger log
DynamicLogger

Constructor Detail

ActiveAlarmTable

public ActiveAlarmTable()
CTOR

Method Detail

getActiveAlarmCount

public int getActiveAlarmCount()
Description copied from interface: ActiveAlarmTableMBean
Number of active alarms in the table

Specified by:
getActiveAlarmCount in interface ActiveAlarmTableMBean

getNotificationsReceived

public long getNotificationsReceived()
Description copied from interface: ActiveAlarmTableMBean
Number of notifications received.

Specified by:
getNotificationsReceived in interface ActiveAlarmTableMBean

setServerId

public void setServerId(String serverId)
Description copied from interface: ActiveAlarmTableMBean
The unique serverId

Specified by:
setServerId in interface ActiveAlarmTableMBean

setMaxTableSize

public void setMaxTableSize(int maxSize)
Description copied from interface: ActiveAlarmTableMBean
The maximum number of alarms to keep, use -1 to disable

Specified by:
setMaxTableSize in interface ActiveAlarmTableMBean

getMaxTableSize

public int getMaxTableSize()
Specified by:
getMaxTableSize in interface ActiveAlarmTableMBean

getServerId

public String getServerId()
Specified by:
getServerId in interface ActiveAlarmTableMBean

setLogLevel

public void setLogLevel(String logLevel)
Description copied from interface: ActiveAlarmTableMBean
The dynamic log level

Specified by:
setLogLevel in interface ActiveAlarmTableMBean

getLogLevel

public String getLogLevel()
Specified by:
getLogLevel in interface ActiveAlarmTableMBean

acknowledgeAll

public int acknowledgeAll(String user,
                          String system)
Acknowledge all

Specified by:
acknowledgeAll in interface ActiveAlarmTableMBean
Returns:
number of acknowledged alarms

unacknowledgeAll

public int unacknowledgeAll(String user,
                            String system)
Uncknowledge all

Specified by:
unacknowledgeAll in interface ActiveAlarmTableMBean
Returns:
number of unacknowledged alarms

acknowledge

public boolean acknowledge(String alarmId,
                           String user,
                           String system)
Acknowledge an Alarm

Specified by:
acknowledge in interface ActiveAlarmTableMBean
Returns:
true if ack was succesful, false otherwise (not in table or acked already)

unacknowledge

public boolean unacknowledge(String alarmId,
                             String user,
                             String system)
Unacknowledge an Alarm

Specified by:
unacknowledge in interface ActiveAlarmTableMBean
Returns:
true if unack was succesful, false otherwise (not in table or unacked already)

fetchAlarmTable

public AlarmTableNotification[] fetchAlarmTable()
Gets the ActiveAlarmTable

Specified by:
fetchAlarmTable in interface ActiveAlarmTableMBean

fetchAlarmTableAsHtml

public String fetchAlarmTableAsHtml()
Gets the ActiveAlarmTable as Html

Specified by:
fetchAlarmTableAsHtml in interface ActiveAlarmTableMBean

startService

public void startService()
                  throws Exception
Start

Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

public void stopService()
                 throws Exception
Stop

Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

handleNotification2

public void handleNotification2(javax.management.Notification notification,
                                Object handback)
Overriden to add handling!

Overrides:
handleNotification2 in class org.jboss.system.ListenerServiceMBeanSupport

substNewLines

protected String substNewLines(Object input)
Convert every occurence of "\n" to "
"



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.