| 
 | OSGi™ Service Platform Compendium Specification Release 4 Version 4.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.osgi.service.dmt.notification.AlertItem
public class AlertItem
Immutable data structure carried in an alert (client initiated notification).
 The AlertItem describes details of various notifications that
 can be sent by the client, for example as alerts in the OMA DM protocol. The
 use cases include the client sending a session request to the server (alert
 1201), the client notifying the server of completion of a software update
 operation (alert 1226) or sending back results in response to an asynchronous
 EXEC command.
 
 The data syntax and semantics varies widely between various alerts, so does
 the optionality of particular parameters of an alert item. If an item, such
 as source or type, is not defined, the corresponding getter method returns
 null. For example, for alert 1201 (client-initiated session) all
 elements will be null.
 
 The syntax used in AlertItem class corresponds to the OMA DM
 alert format. NotificationService implementations on other management
 protocols should map these constructs to the underlying protocol.
| Constructor Summary | |
|---|---|
| AlertItem(java.lang.String[] source,
          java.lang.String type,
          java.lang.String mark,
          DmtData data)Create an instance of the alert item, specifying the source node URI as an array of path segments. | |
| AlertItem(java.lang.String source,
          java.lang.String type,
          java.lang.String mark,
          DmtData data)Create an instance of the alert item. | |
| Method Summary | |
|---|---|
|  DmtData | getData()Get the data associated with the alert item. | 
|  java.lang.String | getMark()Get the mark parameter associated with the alert item. | 
|  java.lang.String | getSource()Get the node which is the source of the alert. | 
|  java.lang.String | getType()Get the type associated with the alert item. | 
|  java.lang.String | toString()Returns the string representation of this alert item. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public AlertItem(java.lang.String source,
                 java.lang.String type,
                 java.lang.String mark,
                 DmtData data)
null.
 The semantics of the parameters may be refined by the definition of a
 specific alert, identified by its alert code (see
 NotificationService.sendNotification(String, int, String, AlertItem[])
 ). In case of Generic Alerts for example (code 1226), the mark
 parameter contains a severity string.
source - the URI of the node which is the source of the alert itemtype - a MIME type or a URN that identifies the type of the data in
        the alert itemdata - a DmtData object that contains the format and value
        of the data in the alert itemmark - the mark parameter of the alert item
public AlertItem(java.lang.String[] source,
                 java.lang.String type,
                 java.lang.String mark,
                 DmtData data)
null. The
 semantics of the parameters may be refined by the definition of a
 specific alert, identified by its alert code (see
 NotificationService.sendNotification(String, int, String, AlertItem[])
 ). In case of Generic Alerts for example (code 1226), the mark
 parameter contains a severity string.
source - the path of the node which is the source of the alert itemtype - a MIME type or a URN that identifies the type of the data in
        the alert itemdata - a DmtData object that contains the format and value
        of the data in the alert itemmark - the mark parameter of the alert item| Method Detail | 
|---|
public java.lang.String getSource()
null if there is no sourcepublic java.lang.String getType()
getData()). There might be no type associated with
 the alert item.
null if
         there is no typepublic java.lang.String getMark()
NotificationService.sendNotification(String, int, String, AlertItem[])
 . There might be no mark associated with the alert item.
null if there
         is no markpublic DmtData getData()
DmtData object contains the format and the value of the
 data in the alert item. There might be no data associated with the alert
 item.
null
         if there is no datapublic java.lang.String toString()
AlertItem(<source>, <type>, <mark>, <data>)The last parameter is the string representation of the data value. The format of the data is not explicitly included.
toString in class java.lang.Object| 
 | OSGi™ Service Platform Compendium Specification Release 4 Version 4.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||