Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.events.server.session
Class SingleAlertExecutionStrategy

java.lang.Object
  extended by org.hyperic.hq.events.server.session.SingleAlertExecutionStrategy
All Implemented Interfaces:
ExecutionStrategy

public class SingleAlertExecutionStrategy
extends java.lang.Object
implements ExecutionStrategy

Implementation of ExecutionStrategy that simply enqueues an AlertConditionsSatisfiedZEvent for processing. This is typically used by alert definitions with a frequency of everytime or once.


Constructor Summary
SingleAlertExecutionStrategy(ZeventEnqueuer zeventEnqueuer)
           
 
Method Summary
 void conditionsSatisfied(AlertConditionsSatisfiedZEvent event)
          Indicates that all conditions associated with an alert definition have been met
 java.io.Serializable getState()
           
 void initialize(java.io.Serializable initialState)
          Initializes this strategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleAlertExecutionStrategy

public SingleAlertExecutionStrategy(ZeventEnqueuer zeventEnqueuer)
Parameters:
zeventEnqueuer - The ZeventEnqueuer to use for sending AlertConditionsSatisfiedZEvents
Method Detail

conditionsSatisfied

public void conditionsSatisfied(AlertConditionsSatisfiedZEvent event)
Description copied from interface: ExecutionStrategy
Indicates that all conditions associated with an alert definition have been met

Specified by:
conditionsSatisfied in interface ExecutionStrategy
Parameters:
event - An AlertConditionsSatisfiedZEvent to process

getState

public java.io.Serializable getState()
Specified by:
getState in interface ExecutionStrategy
Returns:
Any state held by this strategy 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: ExecutionStrategy
Initializes this strategy

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

Hyperic HQ Plugin API v. 4.4.0.2

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