ControlEventTrigger (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.bizapp.server.trigger.conditional.ControlEventTrigger class

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 ControlEventTrigger

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

All Implemented Interfaces:
  ConditionalTriggerInterface, RegisterableTriggerInterface, TriggerInterface

    public class ControlEventTrigger

extends AbstractTrigger
implements ConditionalTriggerInterface

A simple trigger which fires if a control event occurs.

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
`ControlEventTrigger()`

Method Summary
`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.
`void` | `init(RegisteredTriggerValue tval, AlertConditionEvaluator alertConditionEvaluator)` Initialize the trigger with a value object.
`void` | `processEvent(AbstractEvent e)` Process an event from the dispatcher.

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

### ControlEventTrigger

    public ControlEventTrigger()

Method Detail

### 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)`

### 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()`

### 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`
  See Also:
    `org.hyperic.hq.bizapp.server.trigger.conditional.ConditionalTriggerInterface#getConfigResponse()`

### 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)`

### processEvent

    public void processEvent(AbstractEvent e)
                      throws EventTypeException

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

  Specified by:
    `processEvent` in interface `TriggerInterface`
  Parameters:
    `e` - the Event to process
  Throws:
    `EventTypeException` - if the trigger does not process events of the type provided
  See Also:
    `org.hyperic.hq.events.AbstractEvent#processEvent()`

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.