jet.server.api.trigger
Interface Trigger


public interface Trigger

Triggers are managed as a kind of reusable resource in server. A trigger can be bound into scheduled tasks, user can fire a trigger to active scheduled tasks.

Users can through TriggerManager to create a trigger.

See Also:
TriggerManager.createTrigger(java.lang.String, java.lang.String)

Field Summary
static int CRONAT
          Trigger is fired by TriggerManager from inner according a cron condition.
static java.lang.String EVENT_NAME
           
static int EXTERN
          Trigger is fired by customer from outer according customer's condition.
 
Method Summary
 java.lang.String getDescription()
          Retrives description of a trigger.
 java.lang.String getName()
          Retrieves name of a trigger.
 long getPrevFireTime()
          Retrieves the last time fired time.
 int getReferenced()
          Returns referenced count
 boolean isEnable()
          Returns whether the trigger is enabled.
 

Field Detail

EVENT_NAME

static final java.lang.String EVENT_NAME
See Also:
Constant Field Values

CRONAT

static final int CRONAT
Trigger is fired by TriggerManager from inner according a cron condition.

See Also:
Constant Field Values

EXTERN

static final int EXTERN
Trigger is fired by customer from outer according customer's condition.

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Retrieves name of a trigger.

Trigger name is exclusive, the trigger manager use trigger name to distinguish triggers and manages triggers.

Returns:
name of the trigger

getDescription

java.lang.String getDescription()
Retrives description of a trigger.

Returns:
description of a trigger, it can be null.

isEnable

boolean isEnable()
Returns whether the trigger is enabled. An enabled trigger can be fired.

Returns:
true, if the trigger is enabled, else return false.

getPrevFireTime

long getPrevFireTime()
Retrieves the last time fired time.

If the trigger has never been fired, this method will return -1L.

Returns:
the fired time of last time.

getReferenced

int getReferenced()
Returns referenced count

Returns:
referenced count in integer