|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.datapower.wamt.amp.Notification
public class Notification
A POJO representation of an event from a DataPower device.
The Manager
should be notified when
the following events occur on a subscribed device:
dp_src/datapower/webgui/Support/ampSubscriptions.xml
.
When these events occur, the Manager may need to take action, such as
deploying the changed Domain/Settings to the rest of the devices in the
ManagedSet, update the op-state of a Domain, etc.
The NotificationCatcher reads these events from the device, and enqueues them
to the Manager for further action. Refer to the NotificationCatcher
javadoc for how the events are sent by the device. The events will be sent
from the device to the subscriber using CBE (Common Base Event) format. The
NotificationCatcher
handles the transport of the event, and
the Notification
handles the data of the event.
Note that for a Save Config action, notification is not expected
when a running (non-persisted) service configuration object is changed, only
when the administrator invokes Save Config or if one of the
other conditions in the bulleted list occurs.
All the values returned from the gettr methods will be extracted from CBE
fields.
One of the values in the Notification is a sequence number. The sequence
number should be a monotomically increasing integer which indicates the
sequence of the events. This sequence number is used to verify that events
are processed in order and that any missing events are detected. The sequence
number is on a per log target basis, which means that the sequence number
will be reset (to "0") when a new target is created on the device. When the
device creates the events, the sequence number should be in order. However,
the events are transmitted from the device asynchronously: there is a linear
event buffer in which events are enqueued but they may get transmitted
slightly out-of-sequence within a small time window. Whoever reads the
Notifications needs to handle out-of-sequence Notifications. If the device's
event buffer overflows (which is highly unlikely) then the next serial number
will be last serial number plus number of events dropped. So you can have the
following seqeunces:
NotificationCatcher
,
NotificationCatcherFactory
,
Commands
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT_2009_2010
|
Constructor Summary | |
---|---|
Notification(java.io.BufferedReader rawReader)
Constructor for a new Notification object. |
|
Notification(java.lang.String deviceSerialNumber,
int sequenceNumber,
java.lang.String objectClass,
java.lang.String objectName,
java.lang.String timestamp,
java.lang.String clientIpaddress,
java.lang.String msgId)
Deprecated. This should be used only for internal debugging and testcases. It should not be invoked by production code. |
Method Summary | |
---|---|
java.lang.String |
getClientIPAddress()
Get the IP address of the administrative client that made the change on the device that triggered this notification. |
java.lang.String |
getDeviceSerialNumber()
Get the serialNumber of the device that triggered the notification. |
java.lang.String |
getObjectClass()
Get the class of the configuration object on the device that triggered the notification. |
java.lang.String |
getObjectName()
Get the instance name of the configuration on the device that triggered the notification. |
int |
getSequenceNumber()
Get the CBE sequence number for this subscription. |
java.lang.String |
getTimestamp()
Get the device's timestamp of when the notification was triggered on the device. |
boolean |
isBootScheduled()
Check if the notification was triggered by an impending reboot or device restart. |
boolean |
isFirmwareChange()
Check if the notification was triggered by a firmware change. |
boolean |
isModifiedConfigOfDomain()
Check if the notification was triggered by a domain modification on the device that persists the domain. |
boolean |
isModifiedConfigOfSettings()
Check if the notification was triggered by a modification of device that persisted the clonable device-specific settings. |
boolean |
isOpStateChangeDown()
Check if the notification was triggered by a change in an op-state of a domain that made it down now. |
boolean |
isOpStateChangeUp()
Check if the notification was triggered by a change in an op-state of a domain that made it up now. |
boolean |
isSaveConfigOfDomain()
Check if the notification was triggered by a "Save Config" action on the device that persists the domain. |
boolean |
isSaveConfigOfSettings()
Check if the notification was triggered by a "Save Config" action on the device that persisted the clonable device-specific settings. |
boolean |
isTest()
|
java.lang.String |
toString()
Get a human-readable String representation of this object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT_2009_2010
Constructor Detail |
---|
public Notification(java.io.BufferedReader rawReader)
rawReader
- the the BufferedReader that holds the contents of the
SOAP message that was received by the NotificationCatcherpublic Notification(java.lang.String deviceSerialNumber, int sequenceNumber, java.lang.String objectClass, java.lang.String objectName, java.lang.String timestamp, java.lang.String clientIpaddress, java.lang.String msgId)
deviceSerialNumber
- hardware serial number of the devicesequenceNumber
- the CBE sequence number for this subscriptionobjectClass
- the name of the device's configuration class of the
object that triggered the notificationobjectName
- the instance name of the device's configuration object
that triggered the notificationtimestamp
- the timestamp of when the notification was triggered on
the deviceclientIpaddress
- IP address of the administrative client that made
the change.msgId
- the AMP event type, which drives the results of the
is*
methods. See the private member
msgConstants
Method Detail |
---|
public java.lang.String getDeviceSerialNumber()
DeviceMetaInfo.getSerialNumber()
, after it has been
retrieved via Commands.getDeviceMetaInfo(DeviceContext)
.public int getSequenceNumber()
public boolean isSaveConfigOfDomain()
public boolean isModifiedConfigOfDomain()
public boolean isSaveConfigOfSettings()
public boolean isModifiedConfigOfSettings()
public boolean isOpStateChangeUp()
public boolean isOpStateChangeDown()
public boolean isBootScheduled()
public boolean isFirmwareChange()
public boolean isTest()
public java.lang.String getObjectClass()
public java.lang.String getObjectName()
public java.lang.String getTimestamp()
public java.lang.String getClientIPAddress()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |