SAP CC 1.0
API 4.2 (Core)

com.highdeal.notification
Class Notification

java.lang.Object
  extended by com.highdeal.notification.Notification
All Implemented Interfaces:
XMLMarshallable
Direct Known Subclasses:
NetworkNotification

public class Notification
extends java.lang.Object
implements XMLMarshallable

A notification describes an event exceptional or not that takes place in the instances. It informs about where, when and what happened.


XML Schema Fragment
<xs:element name="notification">
   <xs:complexType>   
    <xs:sequence>
     <xs:element name="arg" type="arg" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="instanceId" type="xs:string"/>
    <xs:attribute name="timestamp" type="xs:long"/>
    <xs:attribute name="descUid" type="xs:string"/>
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="prettyName" type="xs:string"/>
    <xs:attribute name="severityLevel" type="xs:string"/>
   </xs:complexType>
  </xs:element>
  
  <xs:complexType name="arg">
   <xs:attribute name="name" type="xs:string"/>
   <xs:attribute name="value" type="xs:anySimpleType"/>
  </xs:complexType>

Field Summary
protected  java.lang.String[] args
           
protected  java.lang.String clusterName
           
protected  NotificationDescription desc
           
protected  InstanceId instanceId
           
static java.lang.String TAG_NAME
           
protected  long timestamp
           
 
Constructor Summary
Notification(java.lang.String clusterName, InstanceId instanceId, long timestamp, NotificationDescription desc, java.lang.String... args)
          Initializes a notification with the instance id of the instance where the event took place, the date when it occurred, the generic description of what happened and a list of argument to give specific information about the event.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the objects, the child represents the marshallable object to be added into the content tree.
 java.lang.String[] getArgs()
          Returns the arguments of this notification.
 java.lang.String getClusterName()
          Returns the name of the cluster of the instance where the event took place.
 NotificationDescription getDesc()
          Return the description of this notification.
 InstanceId getInstanceId()
          Returns the instance id where the event described by this notification took place.
 long getTimestamp()
          Returns the date when the event described by this notification occurred.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, and of its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the tag beeing processed.
 java.lang.String toString()
          Returns a string representation of the instance id, the date, unique identifier, and the specific arguments of a notification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

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

clusterName

protected java.lang.String clusterName

instanceId

protected InstanceId instanceId

desc

protected NotificationDescription desc

timestamp

protected long timestamp

args

protected java.lang.String[] args
Constructor Detail

Notification

public Notification(java.lang.String clusterName,
                    InstanceId instanceId,
                    long timestamp,
                    NotificationDescription desc,
                    java.lang.String... args)
Initializes a notification with the instance id of the instance where the event took place, the date when it occurred, the generic description of what happened and a list of argument to give specific information about the event.

Parameters:
clusterName - the name of the cluster
instanceId - the instance id where the event took place.
timestamp - when the event take place
desc - the description of the event
args - specific argument about the event (is optional and can be null). If is null, the argument list of this notification will be empty but not null.
Throws:
java.lang.AssertionError - if desc is null.
Method Detail

getArgs

public java.lang.String[] getArgs()
Returns the arguments of this notification.

Returns:
An array of string that can be empty but not null.

getDesc

public NotificationDescription getDesc()
Return the description of this notification.

Returns:
a description.

getClusterName

public java.lang.String getClusterName()
Returns the name of the cluster of the instance where the event took place.

Returns:
the cluster name.

getInstanceId

public InstanceId getInstanceId()
Returns the instance id where the event described by this notification took place.

Returns:
the instance id.

getTimestamp

public long getTimestamp()
Returns the date when the event described by this notification occurred.

Returns:
a date.

toString

public java.lang.String toString()
Returns a string representation of the instance id, the date, unique identifier, and the specific arguments of a notification.

Overrides:
toString in class java.lang.Object
Returns:
a string representation.

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the tag beeing processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - the XML attributes of the current tag.

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the objects, the child represents the marshallable object to be added into the content tree.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - the name of tag for the child.
child - the child to be added.

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - the character data to be added.

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, and of its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - the XML output to marshall the object into.

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.