|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrockit.mc.rjmx.notification.NotificationRule
public final class NotificationRule
A notification rule is the 3-tuple (NotificationTrigger,
NotificationConstraint and NotificationAction) with a name.
A rule is an IAttributeValueListener
that will trigger whenever a
value that fulfills the conditions of the rule is intercepted.
Note that this API will change in 4.0.
Constructor Summary | |
---|---|
NotificationRule()
Constructor. |
|
NotificationRule(java.lang.String name,
com.jrockit.mc.rjmx.notification.internal.NotificationTrigger trigger,
com.jrockit.mc.rjmx.notification.internal.NotificationConstraintHolder constraintHolder,
INotificationAction action)
Constructor. |
Method Summary | |
---|---|
void |
addConstraint(INotificationConstraint constraint)
Convenience method to add a constraint to this rule. |
int |
compareTo(java.lang.Object o)
To be able to sort it in lists... |
void |
exportToXml(org.w3c.dom.Element parentNode)
Creates and inserts an XML node for this object that becomes a subnode to the specified parent node. |
INotificationAction |
getAction()
Gets the action. |
com.jrockit.mc.rjmx.notification.internal.NotificationConstraintHolder |
getConstraintHolder()
Gets the constraintHolder. |
java.lang.String |
getDescription()
Returns the description of the rule |
java.lang.String |
getName()
Gets the name. |
java.lang.String |
getRulePath()
A path to the rule. |
INotificationTrigger |
getTrigger()
Gets the trigger. |
protected java.lang.String |
getVerboseInformation()
Only for internal debugging purposes. |
boolean |
hasAction()
|
boolean |
hasConstraints()
|
boolean |
hasTrigger()
|
void |
initializeFromXml(org.w3c.dom.Element node,
INotificationFactory factory)
Initializes the instance according to the specified node representing the object. |
boolean |
isComplete()
This method returns true if the rule has a name, a complete trigger and an action. |
void |
setAction(INotificationAction action)
Sets the action. |
void |
setDescription(java.lang.String description)
Sets the description of the rule |
void |
setName(java.lang.String name)
Sets the name. |
void |
setRulePath(java.lang.String rulePath)
Sets the path to the rule. |
void |
setTrigger(com.jrockit.mc.rjmx.notification.internal.NotificationTrigger trigger)
Sets the trigger. |
java.lang.String |
toString()
|
void |
valueChanged(AttributeValueEvent event)
This method will be called whenever the subscribed attribute's value has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NotificationRule()
public NotificationRule(java.lang.String name, com.jrockit.mc.rjmx.notification.internal.NotificationTrigger trigger, com.jrockit.mc.rjmx.notification.internal.NotificationConstraintHolder constraintHolder, INotificationAction action)
name
- the name of the rule.trigger
- the rule trigger.constraintHolder
- the constraints.action
- the action to perform.Method Detail |
---|
public INotificationAction getAction()
public java.lang.String getRulePath()
public void setRulePath(java.lang.String rulePath)
rulePath
- the path to the rule.public void setAction(INotificationAction action)
action
- The action to setpublic void addConstraint(INotificationConstraint constraint)
constraint
- The constraint to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to setpublic INotificationTrigger getTrigger()
public void setTrigger(com.jrockit.mc.rjmx.notification.internal.NotificationTrigger trigger)
trigger
- the trigger to setpublic com.jrockit.mc.rjmx.notification.internal.NotificationConstraintHolder getConstraintHolder()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
protected java.lang.String getVerboseInformation()
public boolean hasConstraints()
public boolean hasTrigger()
public boolean hasAction()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(Object)
public void initializeFromXml(org.w3c.dom.Element node, INotificationFactory factory)
node
- the XML node representing the objectpublic void exportToXml(org.w3c.dom.Element parentNode)
parentNode
- the XML node to become a subnode topublic void valueChanged(AttributeValueEvent event)
IAttributeValueListener
valueChanged
in interface IAttributeValueListener
event
- the event containing change information.IAttributeValueListener.valueChanged(AttributeValueEvent)
public boolean isComplete()
public void setDescription(java.lang.String description)
description
- the description, or null if not availablepublic java.lang.String getDescription()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |