Sonic Management API

com.sonicsw.mf.common.runtime
Interface INotification

All Superinterfaces:
java.io.Serializable

public interface INotification
extends java.io.Serializable

The notification interface represents a notification emitted from a Sonic Management Framework compliant component.

When a notifiable event occurs, components create a notification. Event information is included in the notification by adding attributes (name/value pairs).

Management applications subscribe to notifications through the JMS connector and may cast JMX notifications to INotification in order to access the additional functionality of this interface.

See Also:
JMSConnectorClient, JMSConnectorClient.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

Field Summary
static short ALERT_SUBCATEGORY
           
static short APPLICATION_CATEGORY
           
static java.lang.String[] CATEGORY_TEXT
          A textual representation of the notification category may be obtained using the return value from getCategory() as an index into the array.
static java.lang.String CLASSNAME
           
static short CONFIGURATION_CATEGORY
           
static short ERROR_TYPE
           
static short FAILURE_AUDIT_TYPE
           
static short INFORMATION_TYPE
           
static short LOG_SUBCATEGORY
           
static java.lang.String[] LOGTYPE_TEXT
          A textual representation of the notification log type may be obtained using the return value from getLogType() as an index into the array.
static short MONITOR_SUBCATEGORY
           
static short SECURITY_SUBCATEGORY
           
static short STATE_SUBCATEGORY
           
static short STORAGE_SUBCATEGORY
           
static java.lang.String[] SUBCATEGORY_TEXT
          A textual representation of the notification subcategory may be obtained using the return value from getSubCategory() as an index into the array.
static short SUCCESS_AUDIT_TYPE
           
static short SYSTEM_CATEGORY
          Management framework system notifications (reserved for internal use only)
static short WARNING_TYPE
           
 
Method Summary
 java.util.HashMap getAttributes()
          Gets the event information specified as attributes.
 short getCategory()
          Each notification belongs to a major category.
 java.lang.String getEventName()
          Each notification type is unique by category/subcategory/event name.
 short getLogType()
           
 long getSequenceNumber()
          Gets the sequence number for the notification.
 int getSeverity()
          Each notification has a severity associated with it.
 java.lang.String getSourceHost()
          Gets the source of the notification.
 IComponentIdentity getSourceIdentity()
          Gets the source of the notification.
 java.lang.String getSubCategory()
          Each notification has a minor category.
 long getTimeStamp()
          Gets the timestamp of the notification.
 java.lang.String getType()
          Each notification type is unique by category/subcategory/event name.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets a notification attribute (a named piece of event information).
 void setLogType(short logType)
          Each notification can be assigned a log type.
 void setSourceIdentity(IComponentIdentity sourceIdentity)
          Sets the source of the notification.
 

Field Detail

ALERT_SUBCATEGORY

static final short ALERT_SUBCATEGORY
See Also:
Constant Field Values

APPLICATION_CATEGORY

static final short APPLICATION_CATEGORY
See Also:
Constant Field Values

CATEGORY_TEXT

static final java.lang.String[] CATEGORY_TEXT
A textual representation of the notification category may be obtained using the return value from getCategory() as an index into the array.

See Also:
getCategory()

CLASSNAME

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

CONFIGURATION_CATEGORY

static final short CONFIGURATION_CATEGORY
See Also:
Constant Field Values

ERROR_TYPE

static final short ERROR_TYPE
See Also:
Constant Field Values

FAILURE_AUDIT_TYPE

static final short FAILURE_AUDIT_TYPE
See Also:
Constant Field Values

INFORMATION_TYPE

static final short INFORMATION_TYPE
See Also:
Constant Field Values

LOG_SUBCATEGORY

static final short LOG_SUBCATEGORY
See Also:
Constant Field Values

LOGTYPE_TEXT

static final java.lang.String[] LOGTYPE_TEXT
A textual representation of the notification log type may be obtained using the return value from getLogType() as an index into the array.

See Also:
getLogType()

MONITOR_SUBCATEGORY

static final short MONITOR_SUBCATEGORY
See Also:
Constant Field Values

SECURITY_SUBCATEGORY

static final short SECURITY_SUBCATEGORY
See Also:
Constant Field Values

STATE_SUBCATEGORY

static final short STATE_SUBCATEGORY
See Also:
Constant Field Values

STORAGE_SUBCATEGORY

static final short STORAGE_SUBCATEGORY
See Also:
Constant Field Values

SUBCATEGORY_TEXT

static final java.lang.String[] SUBCATEGORY_TEXT
A textual representation of the notification subcategory may be obtained using the return value from getSubCategory() as an index into the array.

See Also:
getSubCategory()

SUCCESS_AUDIT_TYPE

static final short SUCCESS_AUDIT_TYPE
See Also:
Constant Field Values

SYSTEM_CATEGORY

static final short SYSTEM_CATEGORY
Management framework system notifications (reserved for internal use only)

See Also:
Constant Field Values

WARNING_TYPE

static final short WARNING_TYPE
See Also:
Constant Field Values
Method Detail

getAttributes

java.util.HashMap getAttributes()
Gets the event information specified as attributes.

Returns:
The attribute table or null if there are no attributes.

getCategory

short getCategory()
Each notification belongs to a major category.

Permissible values are 0 thru 3 (see <>_CATEGORY constants).


getEventName

java.lang.String getEventName()
Each notification type is unique by category/subcategory/event name. Event names are descriptive of what event generated the notification.


getLogType

short getLogType()
See Also:
setLogType(short)

getSequenceNumber

long getSequenceNumber()
Gets the sequence number for the notification. Sequence numbers are unique within a component and imply an order based on the time the sequence number is assigned to the notification. Sequence numbers start at 0 and increment by 1, but some sequence numbers may appear to be skipped due to the fact that notifications are also used internally.

Returns:
The sequence number of the notification.

getSeverity

int getSeverity()
Each notification has a severity associated with it. Severities can be used by client applications to prioritize multiple notifications. Additionally the severity of certain notifications will be used to derive an aggregated state for a container.


getSourceHost

java.lang.String getSourceHost()
Gets the source of the notification. The source of the notification is set by the container prior to sending the notification to interested parties.

Returns:
The host IP of the machine hosting the container/component source that generated the notification.

getSourceIdentity

IComponentIdentity getSourceIdentity()
Gets the source of the notification. The source of the notification is set by the container prior to sending the notification to interested parties.

Returns:
The MF runtime identity of the component that generated the notification.

getSubCategory

java.lang.String getSubCategory()
Each notification has a minor category.

A subset of well known values are defined as constants (see <>_SUBCATEGORY constants).


getTimeStamp

long getTimeStamp()
Gets the timestamp of the notification. This will be a timestamp based on the system clock of the machine on which the notification was generated and this should be taken into account by recipients of notifications that reside on different machines with a possibly conflicting system clock setting.

Returns:
The notification timestamp.

getType

java.lang.String getType()
Each notification type is unique by category/subcategory/event name. This method returns the full notification type name as a string.


setAttribute

void setAttribute(java.lang.String name,
                  java.lang.Object value)
Sets a notification attribute (a named piece of event information). Each attribute should be uniquely named (to avoid overwriting already specified attributes).

Parameters:
name - The attribute name.
value - The attribute value (should be base types or arrays of base types).

setLogType

void setLogType(short logType)
Each notification can be assigned a log type. If not set explicitly it will derived from the severity.

Log types are intended for indexing of information types by log\audit services (e.g. Microsoft Event Viewer). They provide a narrower/alternate view of severity.

Parameters:
logType - Permissible values are 0 thru 4 (see <>_TYPE constants).

setSourceIdentity

void setSourceIdentity(IComponentIdentity sourceIdentity)
Sets the source of the notification. The source of the notification is set by the container prior to sending the notification to interested parties. Once set the sourceIdenity cannot be reset.


Sonic Management API

Copyright © 2001-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 12-Aug-2011.