Class Notification
- java.lang.Object
-
- org.jboss.as.controller.notification.Notification
-
public class Notification extends Object
A notification emitted by a resource and handled byNotificationHandler
.- Author:
- Jeff Mesnil (c) 2013 Red Hat inc.
-
-
Constructor Summary
Constructors Constructor Description Notification(String type, PathAddress source, String message)
Notification(String type, PathAddress source, String message, org.jboss.dmr.ModelNode data)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Notification
fromModelNode(org.jboss.dmr.ModelNode node)
org.jboss.dmr.ModelNode
getData()
String
getMessage()
PathAddress
getSource()
long
getTimestamp()
The timestamp is set when the notification is instantiaged.String
getType()
org.jboss.dmr.ModelNode
toModelNode()
String
toString()
-
-
-
Field Detail
-
SOURCE
public static final String SOURCE
- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
MESSAGE
public static final String MESSAGE
- See Also:
- Constant Field Values
-
TIMESTAMP
public static final String TIMESTAMP
- See Also:
- Constant Field Values
-
DATA
public static final String DATA
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Notification
public Notification(String type, PathAddress source, String message)
-
Notification
public Notification(String type, PathAddress source, String message, org.jboss.dmr.ModelNode data)
- Parameters:
data
- can benull
-
-
Method Detail
-
getType
public String getType()
- Returns:
- the type of notification
-
getSource
public PathAddress getSource()
- Returns:
- the address of the resource that emitted the notification (its source)
-
getMessage
public String getMessage()
- Returns:
- a human-readable i18end description of the notification
-
getTimestamp
public long getTimestamp()
The timestamp is set when the notification is instantiaged.- Returns:
- the timestamp (in ms since the Unix Epoch) of the notification.
-
getData
public org.jboss.dmr.ModelNode getData()
- Returns:
- data contextual to the notification or
null
-
toModelNode
public org.jboss.dmr.ModelNode toModelNode()
- Returns:
- a detyped representation of the notification
-
fromModelNode
public static Notification fromModelNode(org.jboss.dmr.ModelNode node)
- Returns:
- a Notification created from the detyped representation in
node
-
-