com.jrockit.mc.rjmx.notification
Class NotificationEvent

java.lang.Object
  extended by com.jrockit.mc.rjmx.notification.NotificationEvent

public class NotificationEvent
extends java.lang.Object

Event sent to registered NotificationActions when a certain condition is met (after a constraint and value check).

Author:
Marcus Hirt

Constructor Summary
NotificationEvent(IConnectionHandle source, NotificationRule rule, java.lang.Object triggerValue, boolean wasTriggered)
          Constructor.
NotificationEvent(IConnectionHandle source, NotificationRule rule, java.lang.Object triggerValue, boolean wasTriggered, int sustainTime)
          Constructor.
 
Method Summary
 java.lang.String getConnectorSourceDescription()
          Gets the connectorSourceDescription.
 java.util.Date getCreationTime()
          Returns the time (date) the event was created.
 NotificationRule getRule()
          Gets the rule.
 IConnectionHandle getSource()
          Returns the IConnectionHandle that was the source of the event.
 int getSustainTime()
          Returns the time this value was sustained.
 java.lang.Object getTriggerValue()
          Returns the value that triggered the rule.
 java.lang.String toString()
           
 boolean wasRecovered()
          Returns true if the event was Triggered.
 boolean wasTriggered()
          Returns true if the event was Triggered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotificationEvent

public NotificationEvent(IConnectionHandle source,
                         NotificationRule rule,
                         java.lang.Object triggerValue,
                         boolean wasTriggered)
Constructor.

Parameters:
source - The connector model that sent the event. want to pass references to such large objects in an event that might be passed over a network in the future.
rule - The rule that resulted in this event.
triggerValue - The value on which we triggered.
wasTriggered - True if we were triggered, false if we recovered.

NotificationEvent

public NotificationEvent(IConnectionHandle source,
                         NotificationRule rule,
                         java.lang.Object triggerValue,
                         boolean wasTriggered,
                         int sustainTime)
Constructor.

Parameters:
source - The ConnectorModel that sent the event.
rule - The rule that resulted in this event.
triggerValue - The value on which we triggered.
wasTriggered - True if we were triggered, false if we recovered.
sustainTime - > 0 if this was a result of triggering from a certain level being sustained over a certain time.
Method Detail

getTriggerValue

public java.lang.Object getTriggerValue()
Returns the value that triggered the rule.

Returns:
the value that triggered the rule.

getCreationTime

public java.util.Date getCreationTime()
Returns the time (date) the event was created.

Returns:
the time (date) the event was created.

getRule

public NotificationRule getRule()
Gets the rule.

Returns:
NotificationRule the NotificationRule that triggered the event.

wasTriggered

public boolean wasTriggered()
Returns true if the event was Triggered.

Returns:
boolean true if it was triggered.

wasRecovered

public boolean wasRecovered()
Returns true if the event was Triggered.

Returns:
boolean true if it was recovering.

getConnectorSourceDescription

public java.lang.String getConnectorSourceDescription()
Gets the connectorSourceDescription.

Returns:
Returns a String

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getSustainTime

public int getSustainTime()
Returns the time this value was sustained. If this event is not the result of a rule having a sustain value > 0, this value will be 0.

Returns:
the time this value was sustained. If this event is not the result of a rule having a sustain value > 0, this value will be 0.

getSource

public IConnectionHandle getSource()
Returns the IConnectionHandle that was the source of the event.

Returns:
the IConnectionHandle that was the source of the event.


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.