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.events.server.session
Class SingleConditionEvaluator

    java.lang.Object
      org.hyperic.hq.events.server.session.SingleConditionEvaluator

All Implemented Interfaces:
  AlertConditionEvaluator

    public class SingleConditionEvaluator

extends java.lang.Object
implements AlertConditionEvaluator

Implementation of `AlertConditionEvaluator` that sends a new `AlertConditionsSatisfiedZEvent` to its `ExecutionStrategy` whenever a trigger is fired, representing the evaluation of a single condition.

Constructor Summary
`SingleConditionEvaluator(java.lang.Integer alertDefinitionId, ExecutionStrategy executionStrategy)`

Method Summary
`java.lang.Integer` | `getAlertDefinitionId()`
`ExecutionStrategy` | `getExecutionStrategy()`
`java.io.Serializable` | `getState()`
`void` | `initialize(java.io.Serializable initialState)` Initializes this evaluator
`void` | `triggerFired(TriggerFiredEvent event)` A trigger was fired, indicating an alert condition evaluated to true
`void` | `triggerNotFired(TriggerNotFiredEvent event)` A trigger was not fired, indicating that an alert condition evaluated to false

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

Constructor Detail

### SingleConditionEvaluator

    public SingleConditionEvaluator(java.lang.Integer alertDefinitionId,
                                    ExecutionStrategy executionStrategy)

Parameters:
  `alertDefinitionId` - The ID of the alert definition whose conditions are being evaluated
  `executionStrategy` - The `ExecutionStrategy` to use for firing an `AlertConditionsSatisfiedZEvent` when a condition has been met

Method Detail

### getAlertDefinitionId

    public java.lang.Integer getAlertDefinitionId()

  Specified by:
    `getAlertDefinitionId` in interface `AlertConditionEvaluator`
  Returns:
    The ID of the alert definition associated with this evaluator

### getExecutionStrategy

    public ExecutionStrategy getExecutionStrategy()

  Specified by:
    `getExecutionStrategy` in interface `AlertConditionEvaluator`
  Returns:
    The `ExecutionStrategy` used by this evaluator to fire alert condition satisfied events

### getState

    public java.io.Serializable getState()

  Specified by:
    `getState` in interface `AlertConditionEvaluator`
  Returns:
    Any state held by this evaluator that should be persisted between server restarts. May be null if no state saved.

### initialize

    public void initialize(java.io.Serializable initialState)

  Description copied from interface: `AlertConditionEvaluator`
  Initializes this evaluator

  Specified by:
    `initialize` in interface `AlertConditionEvaluator`
  Parameters:
    `initialState` - Any state that was saved by the evaluator with this alertDefinitionId the last time the server was shutdown. May be null if no state saved.

### triggerFired

    public void triggerFired(TriggerFiredEvent event)

  Description copied from interface: `AlertConditionEvaluator`
  A trigger was fired, indicating an alert condition evaluated to true

  Specified by:
    `triggerFired` in interface `AlertConditionEvaluator`
  Parameters:
    `event` - The `TriggerFiredEvent` representing the data that caused the condition to evaluate to true

### triggerNotFired

    public void triggerNotFired(TriggerNotFiredEvent event)

  Description copied from interface: `AlertConditionEvaluator`
  A trigger was not fired, indicating that an alert condition evaluated to false

  Specified by:
    `triggerNotFired` in interface `AlertConditionEvaluator`
  Parameters:
    `event` - The `TriggerNotFiredEvent` representing the data that caused the condition to evaluate to true

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.