Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.events.ext
Interface RegisterableTriggerInterface

All Known Implementing Classes:
AbstractTrigger, AlertTrigger, ConfigChangedTrigger, ControlEventTrigger, CustomPropertyTrigger, LogEventTrigger, MeasurementThresholdTrigger, ValueChangeTrigger

public interface RegisterableTriggerInterface

An interface for triggers which can be dispatched by the RegisteredDispatcher.


Method Summary
 ConfigSchema getConfigSchema()
           
 java.lang.Integer getId()
           
 java.lang.Class[] getInterestedEventTypes()
          Get the event classes that the trigger is interested in seeing.
 java.lang.Integer[] getInterestedInstanceIDs(java.lang.Class c)
          Get a list of instance IDs specific to a class (as returned by getInterestedEventTypes) which the trigger is interested in seeing.
 void init(RegisteredTriggerValue trigger, AlertConditionEvaluator alertConditionEvaluator)
          Initialize the trigger with a value object.
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
           
 

Method Detail

getConfigSchema

ConfigSchema getConfigSchema()

getId

java.lang.Integer getId()
Returns:
The ID of this trigger

getInterestedEventTypes

java.lang.Class[] getInterestedEventTypes()
Get the event classes that the trigger is interested in seeing. This is an optimization, so that a trigger's processEvent() method is called only when a valid event occurs.

Returns:
an array of Class objects which implement the 'Event' interface

getInterestedInstanceIDs

java.lang.Integer[] getInterestedInstanceIDs(java.lang.Class c)
Get a list of instance IDs specific to a class (as returned by getInterestedEventTypes) which the trigger is interested in seeing. These values are specific to the event type, and represent things such as specific measurements.

Parameters:
c - Class to get the interested event IDs for
Returns:
An array of integers representing the instance IDs for the specific event class

init

void init(RegisteredTriggerValue trigger,
          AlertConditionEvaluator alertConditionEvaluator)
          throws InvalidTriggerDataException
Initialize the trigger with a value object.

Parameters:
trigger - The trigger data object containing all the configuration data
alertConditionEvaluator - The evaluator to use for reporting trigger fired/trigger not fired events
Throws:
InvalidTriggerDataException - if the configuration data is invalid.

isEnabled

boolean isEnabled()
Returns:
true if the trigger is enabled, likely meaning its associated alert definition is enabled

setEnabled

void setEnabled(boolean enabled)
Parameters:
enabled - true to enable the trigger for event processing, false otherwise. This state will likely match the enabled state of the trigger's associated alert definition

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.