Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.bizapp.server.trigger.conditional
Class AlertTrigger

    java.lang.Object
      org.hyperic.hq.events.ext.AbstractTrigger
          org.hyperic.hq.bizapp.server.trigger.conditional.AlertTrigger

All Implemented Interfaces:
  ConditionalTriggerInterface, RegisterableTriggerInterface, TriggerInterface

    public class AlertTrigger

extends AbstractTrigger
implements ConditionalTriggerInterface

The AlertTrigger fires when an alert is fired from a specified alert definition.

Field Summary

Fields inherited from class org.hyperic.hq.events.ext.AbstractTrigger
`log`

Fields inherited from interface org.hyperic.hq.bizapp.server.trigger.conditional.ConditionalTriggerInterface
`CFG_COMPARATOR, CFG_ID, CFG_NAME, CFG_OPTION, CFG_THRESHOLD, CFG_TYPE, MAP_COND_TRIGGER`

Constructor Summary
`AlertTrigger()` Creates a new instance of AlertTrigger

Method Summary
`java.lang.Integer` | `getAlertDefinitionId()`
`ConfigResponse` | `getConfigResponse(AppdefEntityID id, AlertConditionValue cond)` Translate alert condition to config response object
`ConfigSchema` | `getConfigSchema()` Return the schema for the configuration of this trigger.
`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.
`long` | `getTimeRange()` Getter for property timeRange.
`void` | `init(RegisteredTriggerValue tval, AlertConditionEvaluator alertConditionEvaluator)` Initialize the trigger with a value object.
`void` | `processEvent(AbstractEvent event)` Process an event from the dispatcher.
`void` | `setAlertDefinitionId(java.lang.Integer val)`
`void` | `setTimeRange(long val)` Setter for property timeRange.

Methods inherited from class org.hyperic.hq.events.ext.AbstractTrigger
`fireActions, getId, isEnabled, notFired, prepareTriggerFiredEvent, prepareTriggerFiredEvent, setAlertConditionEvaluator, setEnabled, setId`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AlertTrigger

    public AlertTrigger()

  Creates a new instance of AlertTrigger

Method Detail

### processEvent

    public void processEvent(AbstractEvent event)
                      throws EventTypeException

  Description copied from interface: `TriggerInterface`
  Process an event from the dispatcher.

  Specified by:
    `processEvent` in interface `TriggerInterface`
  Parameters:
    `event` - the Event to process
  Throws:
    `EventTypeException` - if the trigger does not process events of the type provided

### getConfigSchema

    public ConfigSchema getConfigSchema()

  Description copied from interface: `ConditionalTriggerInterface`
  Return the schema for the configuration of this trigger. This does not actually get called by anyone, it's here to enforce the authors of triggers to implement getConfigSchema() for the CLI.

  Specified by:
    `getConfigSchema` in interface `ConditionalTriggerInterface`
  Specified by:
    `getConfigSchema` in interface `RegisterableTriggerInterface`
  See Also:
    `RegisterableTriggerInterface.getConfigSchema()`

### getInterestedEventTypes

    public java.lang.Class[] getInterestedEventTypes()

  Description copied from interface: `RegisterableTriggerInterface`
  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.

  Specified by:
    `getInterestedEventTypes` in interface `RegisterableTriggerInterface`
  Returns:
    an array of Class objects which implement the 'Event' interface
  See Also:
    `RegisterableTriggerInterface.getInterestedEventTypes()`

### getInterestedInstanceIDs

    public java.lang.Integer[] getInterestedInstanceIDs(java.lang.Class c)

  Description copied from interface: `RegisterableTriggerInterface`
  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.

  Specified by:
    `getInterestedInstanceIDs` in interface `RegisterableTriggerInterface`
  Parameters:
    `c` - Class to get the interested event IDs for
  Returns:
    An array of integers representing the instance IDs for the specific event class
  See Also:
    `RegisterableTriggerInterface.getInterestedInstanceIDs(java.lang.Class)`

### init

    public void init(RegisteredTriggerValue tval,
                     AlertConditionEvaluator alertConditionEvaluator)
              throws InvalidTriggerDataException

  Description copied from interface: `RegisterableTriggerInterface`
  Initialize the trigger with a value object.

  Specified by:
    `init` in interface `RegisterableTriggerInterface`
  Parameters:
    `tval` - 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.
  See Also:
    `org.hyperic.hq.events.ext.RegisterableTriggerInterface#init(org.hyperic.hq.events.shared.RegisteredTriggerValue)`

### getTimeRange

    public long getTimeRange()

  Getter for property timeRange.

  Returns:
    Value of property timeRange.

### setTimeRange

    public void setTimeRange(long val)

  Setter for property timeRange.

  Parameters:
    `timeRange` - New value of property timeRange.

### getAlertDefinitionId

    public java.lang.Integer getAlertDefinitionId()

  Returns:
    Value of property alertDefinitionId

### setAlertDefinitionId

    public void setAlertDefinitionId(java.lang.Integer val)

  Parameters:
    `alertDefinitionId` - New value of property alertDefinitionId.

### getConfigResponse

    public ConfigResponse getConfigResponse(AppdefEntityID id,
                                            AlertConditionValue cond)
                                     throws InvalidOptionException,
                                            InvalidOptionValueException

  Description copied from interface: `ConditionalTriggerInterface`
  Translate alert condition to config response object

  Specified by:
    `getConfigResponse` in interface `ConditionalTriggerInterface`
    `cond` - the alert condition
  Returns:
    the equivalent config response object
  Throws:
    `InvalidOptionException`
    `InvalidOptionValueException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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