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.ext
Class RegisteredTriggers

    java.lang.Object
      org.hyperic.hq.events.ext.RegisteredTriggers

All Implemented Interfaces:
  RegisterableTriggerRepository

    public class RegisteredTriggers

extends java.lang.Object
implements RegisterableTriggerRepository

Repository of in memory triggers for event processing

Field Summary
`static java.lang.Integer` | `KEY_ALL`

Method Summary
`void` | `addTrigger(RegisterableTriggerInterface trigger)`
`static RegisteredTriggers` | `getAndInitialize()` Will block if the Triggers are not initialized.
`static RegisteredTriggers` | `getInstance()`
`static java.util.Collection` | `getInterestedTriggers(AbstractEvent event)`
`java.util.Collection` | `getInterestedTriggers(java.lang.Class eventClass, java.lang.Integer instanceId)`
`RegisterableTriggerInterface` | `getTriggerById(java.lang.Integer triggerId)`
`boolean` | `isInitialized()`
`static boolean` | `isTriggerInterested(AbstractEvent event)`
`void` | `removeTrigger(java.lang.Integer triggerId)`
`static void` | `reset()`
`void` | `setTriggersEnabled(java.util.Collection triggerIds, boolean enabled)` Enables or disables triggers.

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

Field Detail

### KEY_ALL

    public static final java.lang.Integer KEY_ALL

Method Detail

### getInterestedTriggers

    public java.util.Collection getInterestedTriggers(java.lang.Class eventClass,
                                                      java.lang.Integer instanceId)

  Specified by:
    `getInterestedTriggers` in interface `RegisterableTriggerRepository`
  Parameters:
    `eventClass` - The event class
    `instanceId` - The id of the source instance of the event
  Returns:
    The `RegisterableTriggerInterface`s interested in the event

### addTrigger

    public void addTrigger(RegisterableTriggerInterface trigger)

  Specified by:
    `addTrigger` in interface `RegisterableTriggerRepository`
  Parameters:
    `trigger` - The trigger to add to the repository

### removeTrigger

    public void removeTrigger(java.lang.Integer triggerId)

  Specified by:
    `removeTrigger` in interface `RegisterableTriggerRepository`
  Parameters:
    `triggerId` - The trigger to remove from the repository

### getTriggerById

    public RegisterableTriggerInterface getTriggerById(java.lang.Integer triggerId)

  Specified by:
    `getTriggerById` in interface `RegisterableTriggerRepository`
  Parameters:
    `triggerId` - The trigger ID
  Returns:
    The `RegisterableTriggerInterface` with the specified ID or null if none exists

### setTriggersEnabled

    public void setTriggersEnabled(java.util.Collection triggerIds,
                                   boolean enabled)

  Description copied from interface: `RegisterableTriggerRepository`
  Enables or disables triggers. Should be called when the alert definition is enabled or disabled. Disabled triggers will not be returned from calls to getInterestedTriggers, and therefore will not receive events from the RegisteredDispatcher

  Specified by:
    `setTriggersEnabled` in interface `RegisterableTriggerRepository`
  Parameters:
    `triggerIds` - The triggers that should be enabled or disabled
    `enabled` - true if triggers should be enabled

### isInitialized

    public boolean isInitialized()

  Specified by:
    `isInitialized` in interface `RegisterableTriggerRepository`
  Returns:
    true if the repository has been intialized. This typically occurs shortly after server startup, before the event is processed. Repository contents should be re-created from database.

### getAndInitialize

    public static RegisteredTriggers getAndInitialize()

  Will block if the Triggers are not initialized.

### getInstance

    public static RegisteredTriggers getInstance()

### reset

    public static void reset()

### getInterestedTriggers

    public static java.util.Collection getInterestedTriggers(AbstractEvent event)

### isTriggerInterested

    public static boolean isTriggerInterested(AbstractEvent event)

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.