org.jboss.seam.cron.api.scheduling
Class Trigger

java.lang.Object
  extended by org.jboss.seam.cron.api.scheduling.Trigger

public class Trigger
extends Object

The payload of all scheduled events, be they arbitrarily scheduled or one of the built-in @Every() schedules. Note that the presence of this superclass implies that the following observation is possible: public void doSomething(@Observes @Every Trigger e)

Such an observation is valid, and will respond to every single scheduled event fired (including the built in events).

Author:
Peter Royle

Field Summary
protected  int value
           
 
Constructor Summary
Trigger(long timeFired)
          Create an instance of some subclass of Trigger using the given timeFired.
Trigger(long timeFired, int value)
           
 
Method Summary
 long getTimeFired()
           
 int getValue()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected int value
Constructor Detail

Trigger

public Trigger(long timeFired)
Create an instance of some subclass of Trigger using the given timeFired.

Parameters:
timeFired - Represents the time at which the event represented by this instance fired.

Trigger

public Trigger(long timeFired,
               int value)
Method Detail

getTimeFired

public long getTimeFired()
Returns:
The time at which the event was fired.

getValue

public int getValue()
Returns:
The value of the second, minute or hour fired.

toString

public String toString()
Overrides:
toString in class Object
Returns:
a String representation of this instance, showing the event type and the time at which the event was fired (epoch).


Copyright © 2011 Seam Framework. All Rights Reserved.