com.ibm.retail.si.mgmt.notifications
Interface MgmtNotificationControlMBean


public interface MgmtNotificationControlMBean

This interface describes the Notification Collection & Control function to be implemented on the Master Agent. Its job is to register as a Notification listener on all General Agents and the local Mastera Agent for all Notifications. When notifications are received, they are resent, and those that pass through a local filter are stored in a log, which is implemented as a circular queue of a finite size. When the log reaches the count specified as the maximum size, the oldest stored Notifications are deleted in order to make space for new ones.

The RtlNotificationFilter each instance carries is comprised of one of more fully qualified class names (based on defined Notifications) that is used to control the flow of incoming Notifications that are actually stored in the log. These classnames, as well as the size of the log itself, are configurable, and can be modified at any time during the life of the log as needed by the user. The stored contents of the log can be retrieved by a caller using a variety of additional filtering as detailed by the definition of the interface.

More than one of these logs can be created on the Master Agent, with each one being configured with a different set of filter classnames. For example, it might be desirable to create a log that listens only to type RtlDebugNotification, or RtlTracePointNotification. To make this easier, there are several pre-defined filters listed below, that can be used as starting places for this.

To filter based on criteria other than classname (like type), the class name should be entered in the filter and filtering should be done as Notifications are retrieved from the log.

The ObjectName of this MBean includes the following attributes, in addition to the SIF attribute of DeviceID:

This management interface includes the following attributes. These attributes are described in more detail in the accessor methods.

The following operations are included in this management interface. These are described in more detail in the corresponding method documentation.

This MBean emits all Notifications of various types which are emitted from each General Agent.

Author:
Paul A. Ruocchio
See Also:
RtlNotification, RtlCriticalNotification, RtlEmergencyNotification, RtlAlertNotification, RtlErrorNotification, RtlWarningNotification, RtlNoticeNotification, RtlInformationNotification, RtlDebugNotification, RtlTracePointNotification, RtlConsumerNotification

Field Summary
static java.lang.String[] ALL_FILTER
          Notification filter list that will cause ALL notifications to be passed into the log.
static java.lang.String[] ALL_RTL_FILTER
          Notification filter list that will cause ALL RSS notifications to be passed into the log.
static java.lang.String[] CONSUMER_FILTER
          Notification filter list that will cause ALL Consumer notifications to be passed into the log.
static java.lang.String[] CRITICAL_FILTER
          Notification filter list that will cause ALL Critical notifications to be passed into the log.
static java.lang.String[] DEBUG_FILTER
          Notification filter list that will cause ALL Debug notifications to be passed into the log.
static java.lang.String[] DEFAULT_FILTER
          Default Notification filter list.
static java.lang.String DEFAULT_LOG_NAME
           
static int DEFAULT_Q_SIZE
           
static java.lang.String[] INFORMATION_FILTER
          Notification filter list that will cause ALL Informational notifications to be passed into the log.
static java.lang.String[] LOG_FILTER
          Notification filter list that will cause ALL Logging notifications to be passed into the log.
static java.lang.String OBJECT_NAME
           
 
Method Summary
 void addActiveFilterElement(java.lang.String[] objects)
          Adds Notification Class(s) to the currently active filter.
 java.lang.String[] getActiveFilter()
          Returns the array of Notification Class names that comprise the currently active filter.
 int getCurrentNotificationCount()
          Returns a count that represents the number of Notifications currenly stored in this log.
 int getCurrentNotificationCount(int deviceType)
          Returns a count that represents the number of Notifications currenly stored in this log that were generated by a particular device type.
 int getCurrentNotificationCount(java.lang.String systemId)
          Returns a count that represents the number of Notifications currenly stored in this log that were generated by a particular agent.
 int getCurrentNotificationCount(java.lang.String[] filter)
          Returns a count that represents the number of Notifications currenly stored in this log that are of the type specified in the passed filter.
 int getCurrentNotificationCount(java.lang.String[] filter, int deviceType)
          Returns a count that represents the number of Notifications currenly stored in this log that are of the type specified in the passed Notication filter, and were emitted by the passed device type.
 int getCurrentNotificationCount(java.lang.String[] filter, java.lang.String systemId)
          Returns a count that represents the number of Notifications currenly stored in this log that are of the type specified in the passed filter, and were generated by a particular agent.
 javax.management.Notification getFirstStoredNotification()
          Returns the first stored Notification that matches the search criteria.
 javax.management.Notification getFirstStoredNotification(int deviceType)
          Returns the first stored Notification that matches the search criteria.
 javax.management.Notification getFirstStoredNotification(java.lang.String systemId)
          Returns the first stored Notification that matches the search criteria.
 javax.management.Notification getFirstStoredNotification(java.lang.String[] filter)
          Returns the first stored Notification that matches the search criteria.
 javax.management.Notification getFirstStoredNotification(java.lang.String[] filter, int deviceType)
          Returns the first stored Notification that matches the search criteria.
 javax.management.Notification getFirstStoredNotification(java.lang.String[] filter, java.lang.String systemId)
          Returns the first stored Notification that matches the search criteria.
 java.lang.String getLogName()
          Returns the filename in use by this log.
 javax.management.Notification getNextStoredNotification(long sequenceNo)
          Returns the next stored Notification (based on SequenceNo) that matches the search criteria.
 javax.management.Notification getNextStoredNotification(long sequenceNo, int deviceType)
          Returns the next stored Notification (based on SequenceNo) that matches the search criteria.
 javax.management.Notification getNextStoredNotification(long sequenceNo, java.lang.String systemId)
          Returns the next stored Notification (based on SequenceNo) that matches the search criteria.
 javax.management.Notification getNextStoredNotification(long sequenceNo, java.lang.String[] filter)
          Returns the next stored Notification (based on SequenceNo) that matches the search criteria.
 javax.management.Notification getNextStoredNotification(long sequenceNo, java.lang.String[] filter, int deviceType)
          Returns the next stored Notification (based on SequenceNo) that matches the search criteria.
 javax.management.Notification getNextStoredNotification(long sequenceNo, java.lang.String[] filter, java.lang.String systemId)
          Returns the next stored Notification (based on SequenceNo) that matches the search criteria.
 java.lang.Integer getQMaxSize()
          Get the number of notifications that the persistent store is currently configured to store.
 void initialize()
          Initializes the MBean, setting up communication with the MasterAgent and registers NotificationListeners with all MasterAgent MBeans
 void removeActiveFilterElements(java.lang.String[] objects)
          Removes Notification Class(s) from the currently active filter.
 void resetLog()
          Clears the log of all stored entires.
 void setActiveFilter(java.lang.String[] objects)
          Sets the filter to be used when considering a notification for submition to this log file.
 void setQMaxSize(java.lang.Integer q_Size)
          Set the number of notifications that the persistent store is currently configured to store.
 void shutdown()
          Shutdown of notification control, for sync of registry and file storage.
 

Field Detail

DEFAULT_Q_SIZE

public static final int DEFAULT_Q_SIZE
See Also:
Constant Field Values

DEFAULT_LOG_NAME

public static final java.lang.String DEFAULT_LOG_NAME
See Also:
Constant Field Values

OBJECT_NAME

public static final java.lang.String OBJECT_NAME
See Also:
Constant Field Values

ALL_FILTER

public static final java.lang.String[] ALL_FILTER
Notification filter list that will cause ALL notifications to be passed into the log.


ALL_RTL_FILTER

public static final java.lang.String[] ALL_RTL_FILTER
Notification filter list that will cause ALL RSS notifications to be passed into the log.


CRITICAL_FILTER

public static final java.lang.String[] CRITICAL_FILTER
Notification filter list that will cause ALL Critical notifications to be passed into the log. Those include: RtlCriticalNotification, RtlEmergencyNotification, RtlAlertNotification and all notifications derived from them.


DEBUG_FILTER

public static final java.lang.String[] DEBUG_FILTER
Notification filter list that will cause ALL Debug notifications to be passed into the log. Those include: RtlDebugNotification, RtlTracePointNotification and all notifications derived from them.


LOG_FILTER

public static final java.lang.String[] LOG_FILTER
Notification filter list that will cause ALL Logging notifications to be passed into the log. Those include: RtlTracePointNotification and all notifications derived from it.


CONSUMER_FILTER

public static final java.lang.String[] CONSUMER_FILTER
Notification filter list that will cause ALL Consumer notifications to be passed into the log. Those include: RtlConsumerNotification and all notifications derived from it.


INFORMATION_FILTER

public static final java.lang.String[] INFORMATION_FILTER
Notification filter list that will cause ALL Informational notifications to be passed into the log. Those include: RtlInformationNotification and all notifications derived from it.


DEFAULT_FILTER

public static final java.lang.String[] DEFAULT_FILTER
Default Notification filter list. The default list include: RtlCriticalNotification, RtlEmergencyNotification, RtlAlertNotification, RtlErrorNotification, RtlInformationNotification, RtlNoticeNotification, RtlWarningNotification, and all notifications derived from them.

Method Detail

initialize

public void initialize()
                throws MgmtException
Initializes the MBean, setting up communication with the MasterAgent and registers NotificationListeners with all MasterAgent MBeans

Throws:
MgmtException - Error communicating with the MasterAgent

shutdown

public void shutdown()
Shutdown of notification control, for sync of registry and file storage.


setQMaxSize

public void setQMaxSize(java.lang.Integer q_Size)
                 throws javax.management.InvalidAttributeValueException
Set the number of notifications that the persistent store is currently configured to store. This persistent store is a circular queue, and once the number of stored notifications exceeds this number, the oldest in the queue is removed to allow space for new notificaitons. By default, this value is set to 500. If attempt is made to set this size to a number that is smaller then the currently configured size, then the oldest notifications will be deleted and the log resized accordingly.

Parameters:
q_Size - The number of notifications that the log should be configured to hold.
javax.management.InvalidAttributeValueException

getQMaxSize

public java.lang.Integer getQMaxSize()
Get the number of notifications that the persistent store is currently configured to store.

Returns:
Integer, The number of notifications that this log is currently configured to hold.

getLogName

public java.lang.String getLogName()
Returns the filename in use by this log. Since in any Master Agent there can be one or more instances of this interface (based on filter types), the name is what uniquely identifies this log.

Returns:
String The filename.

setActiveFilter

public void setActiveFilter(java.lang.String[] objects)
                     throws javax.management.InvalidAttributeValueException
Sets the filter to be used when considering a notification for submition to this log file. The log file represented by this interface can be configured to only store notifications of a particular class or classes, and it is this function that sets that. NOTE: that this is not a modification to the filter, but rather a replacement, which means that as a consequence of this call, the implemenation of the log will reset the log on completion of this call.

Parameters:
objects - An array of Notification Class names to be included in the log.
javax.management.InvalidAttributeValueException

addActiveFilterElement

public void addActiveFilterElement(java.lang.String[] objects)
Adds Notification Class(s) to the currently active filter. This is used to append additional Class types to the list of classes that are to be passed by the filter into the log.

Parameters:
objects - An array of Notification Class names to be included in the log.

removeActiveFilterElements

public void removeActiveFilterElements(java.lang.String[] objects)
Removes Notification Class(s) from the currently active filter. This is used to remove Class types from the list of classes that are to be passed by the filter into the log. The side effect of this call is that Notifications currently in the log that match these class name(s) will be removed from the log.

Parameters:
objects - An array of Notification Class names to be removed from the log.

getActiveFilter

public java.lang.String[] getActiveFilter()
Returns the array of Notification Class names that comprise the currently active filter.

Returns:
String[] An array of Notification Class names.

getCurrentNotificationCount

public int getCurrentNotificationCount()
Returns a count that represents the number of Notifications currenly stored in this log.

Returns:
int Number of stored Notifications.

getCurrentNotificationCount

public int getCurrentNotificationCount(java.lang.String[] filter)
Returns a count that represents the number of Notifications currenly stored in this log that are of the type specified in the passed filter. As an example, an applicaiton might only be interested in RtlCriticalNotification, and is looking to determine how many of that type have been logged.

Parameters:
filter - List of Class names to be used to filter the log for a count.
Returns:
int Number of stored Notifications that match the filter.

getCurrentNotificationCount

public int getCurrentNotificationCount(int deviceType)
Returns a count that represents the number of Notifications currenly stored in this log that were generated by a particular device type. For a list of Device Types currenly supported, see the common constants class.

Parameters:
deviceType - Device type
Returns:
int Number of stored Notifications that match the device type.

getCurrentNotificationCount

public int getCurrentNotificationCount(java.lang.String[] filter,
                                       int deviceType)
Returns a count that represents the number of Notifications currenly stored in this log that are of the type specified in the passed Notication filter, and were emitted by the passed device type. As an example, an applicaiton might only be interested in RtlCriticalNotification that were generated by a POS controller, and is looking to determine how many of that type have been logged.

Parameters:
filter - List of Class names to be used to filter the log for a count.
deviceType - Device type
Returns:
int Number of stored Notifications that match the filter.

getCurrentNotificationCount

public int getCurrentNotificationCount(java.lang.String systemId)
Returns a count that represents the number of Notifications currenly stored in this log that were generated by a particular agent.

Parameters:
systemId - The agent's system ID
Returns:
int Number of stored Notifications that match the device type.

getCurrentNotificationCount

public int getCurrentNotificationCount(java.lang.String[] filter,
                                       java.lang.String systemId)
Returns a count that represents the number of Notifications currenly stored in this log that are of the type specified in the passed filter, and were generated by a particular agent. As an example, an application might only be interested in RtlCriticalNotifications that were generated by a particular mobile device, and is looking to determine how many of that type have been logged.

Parameters:
filter - List of Class names to be used to filter the log for a count.
systemId - The agent's system ID
Returns:
int Number of stored Notifications that match the filter.

resetLog

public void resetLog()
Clears the log of all stored entires. This should be used carefully, as it will remove any history that this log was storing.


getFirstStoredNotification

public javax.management.Notification getFirstStoredNotification()
Returns the first stored Notification that matches the search criteria.

Returns:
Notification, The first Notification that matches the filter criteria, or null if there are no more that match.

getNextStoredNotification

public javax.management.Notification getNextStoredNotification(long sequenceNo)
Returns the next stored Notification (based on SequenceNo) that matches the search criteria.

Parameters:
sequenceNo - - Sequence number from the previous notification
Returns:
Notification - The next Notification that matches the filter criteria, or null if there are no more that match.

getFirstStoredNotification

public javax.management.Notification getFirstStoredNotification(java.lang.String[] filter)
Returns the first stored Notification that matches the search criteria. As an example, an applicaiton might only be interested in RtlCriticalNotification, and is looking to determine how many of that type have been logged.

Parameters:
filter - - List of Class names to be used to filter the log.
Returns:
Notification - The first Notification that matches the filter criteria, or null if there are no more that match.

getNextStoredNotification

public javax.management.Notification getNextStoredNotification(long sequenceNo,
                                                               java.lang.String[] filter)
Returns the next stored Notification (based on SequenceNo) that matches the search criteria.

Parameters:
sequenceNo - - The listener that is to be the target of the re-emitted Notifications.
filter - - List of Class names to be used to filter the log.
Returns:
Notification - The next Notification that matches the filter criteria, or null if there are no more that match.

getFirstStoredNotification

public javax.management.Notification getFirstStoredNotification(int deviceType)
Returns the first stored Notification that matches the search criteria. For a list of Device Types currenly supported, see the common constants class.

Parameters:
deviceType - - Device type
Returns:
Notification - The first Notification that matches the filter criteria, or null if there are no more that match.

getNextStoredNotification

public javax.management.Notification getNextStoredNotification(long sequenceNo,
                                                               int deviceType)
Returns the next stored Notification (based on SequenceNo) that matches the search criteria.

Parameters:
sequenceNo - - The listener that is to be the target of the re-emitted Notifications.
deviceType - - Device type
Returns:
Notification - The next Notification that matches the filter criteria, or null if there are no more that match.

getFirstStoredNotification

public javax.management.Notification getFirstStoredNotification(java.lang.String[] filter,
                                                                int deviceType)
Returns the first stored Notification that matches the search criteria. As an example, an applicaiton might only be interested in RtlCriticalNotification that were generated by a POS controller, and is looking to determine how many of that type have been logged.

Parameters:
filter - - List of Class names to be used to filter the log.
deviceType - - Device type
Returns:
Notification - The first Notification that matches the filter criteria, or null if there are no more that match.

getNextStoredNotification

public javax.management.Notification getNextStoredNotification(long sequenceNo,
                                                               java.lang.String[] filter,
                                                               int deviceType)
Returns the next stored Notification (based on SequenceNo) that matches the search criteria. As an example, an applicaiton might only be interested in RtlCriticalNotification that were generated by a POS controller, and is looking to determine how many of that type have been logged.

Parameters:
sequenceNo - - The listener that is to be the target of the re-emitted Notifications.
filter - - List of Class names to be used to filter the log.
deviceType - - Device type
Returns:
Notification - The next Notification that matches the filter criteria, or null if there are no more that match.

getFirstStoredNotification

public javax.management.Notification getFirstStoredNotification(java.lang.String systemId)
Returns the first stored Notification that matches the search criteria.

Parameters:
systemId - - The agent system ID to match
Returns:
Notification - The first Notification that matches the filter criteria, or null if there are no more that match.

getNextStoredNotification

public javax.management.Notification getNextStoredNotification(long sequenceNo,
                                                               java.lang.String systemId)
Returns the next stored Notification (based on SequenceNo) that matches the search criteria.

Parameters:
sequenceNo - - The listener that is to be the target of the re-emitted Notifications.
systemId - - The agent system ID to match
Returns:
Notification - The next Notification that matches the filter criteria, or null if there are no more that match.

getFirstStoredNotification

public javax.management.Notification getFirstStoredNotification(java.lang.String[] filter,
                                                                java.lang.String systemId)
Returns the first stored Notification that matches the search criteria. As an example, an application might only be interested in RtlCriticalNotification(s) that were generated by a particular mobile device, and is looking to determine how many of that type have been logged.

Parameters:
filter - - List of Class names to be used to filter the log.
systemId - - The agent system ID to match
Returns:
Notification - The first Notification that matches the filter criteria, or null if there are no more that match.

getNextStoredNotification

public javax.management.Notification getNextStoredNotification(long sequenceNo,
                                                               java.lang.String[] filter,
                                                               java.lang.String systemId)
Returns the next stored Notification (based on SequenceNo) that matches the search criteria.

Parameters:
sequenceNo - - The listener that is to be the target of the re-emitted Notifications.
filter - - List of Class names to be used to filter the log.
systemId - - The agent system ID to match
Returns:
Notification - The next Notification that matches the filter criteria, or null if there are no more that match.


Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004