Represents a notification emitted by an MBean. More...
#include <SPL/Runtime/Operator/Control/Notification.h>
Public Member Functions |
|
Notification (Notification const &n) | |
Notification (std::string const &type, std::string const &source, uint64_t sequenceNumber) | |
Notification (std::string const &type, std::string const &source, uint64_t sequenceNumber, std::string const &message) | |
Notification (std::string const &type, std::string const &source, uint64_t sequenceNumber, timestamp const &timeStamp) | |
Notification (std::string const &type, std::string const &source, uint64_t sequenceNumber, timestamp const &timeStamp, std::string const &message) | |
Notification (std::string const &type, std::string const &source, uint64_t sequenceNumber, timestamp const &timeStamp, std::string const &message, std::string const &userData) | |
const Notification & | operator= (const Notification &n) |
void | setSource (std::string const &source) |
uint64_t | getSequenceNumber () const |
void | setSequenceNumber (uint64_t sequenceNumber) |
std::string | getType () const |
timestamp | getTimeStamp () const |
void | setTimeStamp (timestamp const &timeStamp) |
std::string | getMessage () const |
std::string | getUserData () const |
std::string | getSource () const |
void | setUserData (std::string const &userData) |
std::string | toString () const |
Friends |
|
std::ostream & | operator<< (std::ostream &o, Notification const &n) |
Represents a notification emitted by an MBean.
A Notification contains a type, sequence number, timestamp and, optionally, specific user data represented as std::string
, and a message. The notification source is the object name of the MBean which emitted the notification.
|
inline |
Copy constructor.
|
inline |
Creates a Notification object.
The notification timeStamp is set to the current time.
type | The notification type. |
source | The notification source. |
sequenceNumber | The notification sequence number within the source object. |
|
inline |
Creates a Notification object with message.
The notification timeStamp is set to the current time.
type | The notification type. |
source | The notification source. |
sequenceNumber | The notification sequence number within the source object. |
message | The detailed message. |
|
inline |
Creates a Notification object.
type | The notification type. |
source | The notification source. |
sequenceNumber | The notification sequence number within the source object. |
timeStamp | It indicates when the notification was generated. |
|
inline |
Creates a Notification object.
type | The notification type. |
source | The notification source. |
sequenceNumber | The notification sequence number within the source object. |
timeStamp | It indicates when the notification was generated. |
message | The detailed message. |
|
inline |
Creates a Notification object.
type | The notification type. |
source | The notification source. |
sequenceNumber | The notification sequence number within the source object. |
timeStamp | It indicates when the notification was generated. |
message | The detailed message. |
userData | The user data object. |
|
inline |
|
inline |
|
inline |
Get the notification sequence number.
The sequence number is a serial number identifying a particular instance of notification in the context of the notification source. The notification model does not assume that notifications will be received in the same order that they are sent. The sequence number helps listeners to sort received notifications.
|
inline |
Set the notification sequence number.
The sequence number is a serial number identifying a particular instance of notification in the context of the notification source.
sequenceNumber | The notification sequence number within the source object. |
|
inline |
Get the notification type.
This is a string expressed in a dot notation similar to Java properties. It is recommended that the notification type should follow the reverse-domain-name convention used by Java package names. An example of a notification type is com.acme.streams.router.alarm
.
|
inline |
Get the notification timestamp.
When converted from a JMX Notification, the Java timestamp value is interpreted as the number of milliseconds since the Unix Epoch, January 1, 1970, 00:00:00 GMT (as returned by java.util.Date.getTime()
), and the machineId field is set to 0.
timestamp
type.
|
inline |
Set the notification timestamp.
The timestamp indicates when the notification was generated.
timeStamp | The notification timestamp. |
|
inline |
Get the notification message.
|
inline |
Get the user data.
This is used for whatever data the notification source wishes to communicate to its consumers. For JMX Notifications, this function returns the toString()
value of the Java Notification's user data. An empty C++ string is returned if the Java Notification user data is null.
|
inline |
Get the notification source.
If the source is an MXBean then this function returns the canonical form of the source's ObjectName
(see javax.management.ObjectName.getCanonicalName()
).
|
inline |
Set the user data.
userData | The user data object. It is used for whatever data the notification source wishes to communicate to its consumers. |
|
inline |
Returns a string representation of this notification.
|
friend |
Print internal state through the << operator.
o | output stream. |
n | The Notification object. |