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.rmi
Interface RemoteTriggerManager

All Superinterfaces:
  java.rmi.Remote

    public interface RemoteTriggerManager

extends java.rmi.Remote

The `TriggerManager` manages all triggers in the server.

See Also:
  `TriggerManager`, `Trigger`, `RemoteException`

Field Summary
`static java.lang.String` | `RMINAME`

Method Summary
`boolean` | `contains(java.lang.String triggerName)` Tests whether there is a trigger specified by triggerName in the `RemoteTriggerManager`.
`Trigger` | `createTrigger(java.lang.String triggerName, java.lang.String triggerDesc)` Creates a new EXTERN trigger with the specified trigger name and description in the inner collection if there is no trigger with the same name.
`void` | `deleteTrigger(java.lang.String triggerName)` Deletes an existing `Trigger` specified by triggerName.
`void` | `fire(java.lang.String triggerName, java.util.Properties userData)` Fires a trigger with the specified name and the customer's trigger data.
`Trigger` | `getTrigger(java.lang.String triggerName)` Gets an existing `Trigger` specified by triggerName.
`void` | `setEnable(java.lang.String triggerName, boolean enable)` Enables or disables a `Trigger` specified by triggerName.
`int` | `size()` Gets the number of triggers in the `RemoteTriggerManager`.
`Trigger[]` | `toArray()` Gets all triggers in the `RemoteTriggerManager`, and the triggers are put into an Array.

Field Detail

### RMINAME

    static final java.lang.String RMINAME

See Also:
  Constant Field Values

Method Detail

### createTrigger

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

  Creates a new EXTERN trigger with the specified trigger name and description in the inner collection if there is no trigger with the same name.

  Parameters:
    `triggerName` - The name of the trigger which you want to create.
    `triggerDesc` - The description of the trigger which you want to create.
  Returns:
    A trigger instance if there is no trigger with the name specified by triggerName yet, otherwise throws a TriggerManageException.
  Throws:
    `TriggerManageException` - If there is a trigger with the same name specified by triggerName already.
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
  See Also:
    `RemoteException`

### getTrigger

    Trigger getTrigger(java.lang.String triggerName)
                       throws java.rmi.RemoteException

  Gets an existing `Trigger` specified by triggerName.

  Parameters:
    `triggerName` - The name of the trigger which you want to get.
  Returns:
    A `Trigger` instance if it exists, else `null`.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
  See Also:
    `RemoteException`

### deleteTrigger

    void deleteTrigger(java.lang.String triggerName)
                       throws TriggerManageException,
                              java.rmi.RemoteException

  Deletes an existing `Trigger` specified by triggerName.

  Parameters:
    `triggerName` - The name of the trigger which you want to delete.
  Throws:
    `TriggerManageException` - If the trigger specified by triggerName is not bound with any scheduled task, that is to say, the trigger is not referenced, it will be deleted, otherwise, a `TriggerManageException` will be thrown.
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
  See Also:
    `RemoteException`

### setEnable

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

  Enables or disables a `Trigger` specified by triggerName.

  An enabled trigger can be fired, but a disabled trigger cannot.

  Parameters:
    `triggerName` - The name of the trigger which you want to enable or disable.
    `enable` - true to enable the trigger, and false to disable the trigger.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
  See Also:
    `RemoteException`

### fire

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

  Fires a trigger with the specified name and the customer's trigger data. When a trigger is fired, the scheduled tasks bound with it will get running, and if there is no scheduled tasks bound with the trigger, nothing will happen except the last fired time of the trigger is updated.

  Parameters:
    `triggerName` - The name of the trigger which you want to fire.
    `userData` - The customer's trigger data passed to the scheduled tasks. It can be used to transfer the parameters of the reports between external system and the server.
  Throws:
    `TriggerManageException` - A `TriggerManagerException` will be thrown if there is no trigger specified by triggerName.
    `java.rmi.RemoteException`
  See Also:
    `RemoteException`

### contains

    boolean contains(java.lang.String triggerName)
                     throws java.rmi.RemoteException

  Tests whether there is a trigger specified by triggerName in the `RemoteTriggerManager`.

  Parameters:
    `triggerName` - The name of the trigger which you want to test.
  Returns:
    `true` if this manager contains the specified trigger.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
  See Also:
    `RemoteException`

### toArray

    Trigger[] toArray()
                      throws java.rmi.RemoteException

  Gets all triggers in the `RemoteTriggerManager`, and the triggers are put into an Array.

  Returns:
    An array of Trigger which contains all the triggers in the manager.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
  See Also:
    `RemoteException`

### size

    int size()
             throws java.rmi.RemoteException

  Gets the number of triggers in the `RemoteTriggerManager`.

  Returns:
    The number of triggers in the `RemoteTriggerManager`.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
  See Also:
    `RemoteException`

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