Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api.trigger
Interface TriggerManager

    public interface TriggerManager

The `TriggerManager` manages all triggers in the server.

Method Summary
`boolean` | `contains(java.lang.String triggerName)` Returns `true` if this manager contains the specified trigger.
`Trigger` | `createTrigger(java.lang.String triggerName, java.lang.String triggerDesc)` Creates a new EXTERN trigger with specified trigger name and description in the inner collection if it is not already present.
`void` | `deleteTrigger(java.lang.String triggerName)` Deletes an existing `Trigger` specified by name.
`void` | `fire(java.lang.String triggerName, java.util.Properties userData)` Fire the trigger with specified name and customer's trigger data
`Trigger` | `getTrigger(java.lang.String triggerName)` Returns a existing `Trigger` specified by name.
`java.util.Iterator` | `iterator()` Returns an iterator over the triggers in this manager.
`void` | `setEnable(java.lang.String triggerName, boolean enable)` Enable or disable a trigger.
`int` | `size()` Returns the number of triggers in this manager.

Method Detail

### createTrigger

    Trigger createTrigger(java.lang.String triggerName,
                          java.lang.String triggerDesc)
                          throws TriggerManageException

  Creates a new EXTERN trigger with specified trigger name and description in the inner collection if it is not already present.

  Parameters:
    `triggerName` - trigger name
    `triggerDesc` - trigger description
  Returns:
    A trigger instance if the manager did not already contain the specified trigger name; else throws TriggerManageException.
  Throws:
    `TriggerManageException`

### getTrigger

    Trigger getTrigger(java.lang.String triggerName)

  Returns a existing `Trigger` specified by name.

  Parameters:
    `triggerName` - trigger name that you want to get
  Returns:
    a `Trigger` instance, it may be `null`.

### deleteTrigger

    void deleteTrigger(java.lang.String triggerName)
                       throws TriggerManageException

  Deletes an existing `Trigger` specified by name.

  Parameters:
    `triggerName` - trigger name that you want to delete
  Throws:
    `TriggerManageException` - If the trigger is referenced then throw TriggerManageException

### setEnable

    void setEnable(java.lang.String triggerName,
                   boolean enable)

  Enable or disable a trigger.

  An enable trigger can be fired, but a disbale trigger can not.

  Parameters:
    `triggerName` -
    `enable` - true to enable the trigger, elsewise disable the trigger.

### fire

    void fire(java.lang.String triggerName,
              java.util.Properties userData)
              throws TriggerManageException

  Fire the trigger with specified name and customer's trigger data

  Parameters:
    `triggerName` - The trigger name which wnat to fired
    `userData` - The customer's trigger data that pass to a scheduled task
  Throws:
    `TriggerManageException` - If the trigger is not exist then throw TriggerManagerException

### contains

    boolean contains(java.lang.String triggerName)

  Returns `true` if this manager contains the specified trigger.

  Parameters:
    `triggerName` - trigger name that is to be tested.
  Returns:
    `true` if this manager contains the specified trigger.

### iterator

    java.util.Iterator iterator()

  Returns an iterator over the triggers in this manager.

  Returns:
    an `Iterator` over the triggers in this manager

### size

    int size()

  Returns the number of triggers in this manager.

  Returns:
    the number of triggers in this manager

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD