|
WebObjects 5.4.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.webobjects.appserver.WOTimer
@Deprecated public class WOTimer
WOTimer creates timer objects, or more simply, timers. A timer waits until its fireDate
is reached and then fires, sending a specified message to a specified object. If you
specify that the timer should repeat, it automatically reschedules itself after it fires.
The static method scheduledTimer creates and schedules a timer. The
constructors create timers which can later be scheduled by invoking the method schedule.
Timers can be unscheduled by invoking invalidate on the timer to be unscheduled.
WOTimer.fireDate(),
WOTimer.invalidate(),
WOTimer.schedule(),
WOTimer.scheduledTimer(long ti, Object aTarget, String aSelectorName, Object userInfo, boolean repeats),
WOTimer.scheduledTimer(long ti, Object aTarget, String aSelectorName, Object anArgument, Class anArgumentClass, boolean repeats)| Constructor Summary | |
|---|---|
WOTimer(long ti,
Object aTarget,
String aSelectorName,
Object userInfo,
Class userInfoClass,
boolean repeats)
Deprecated. Creates a timer which will fire after ti milliseconds, and at
intervals ti thereafter (if repeats is true). |
|
WOTimer(NSTimestamp fireDate,
long interval,
Object aTarget,
String aSelectorName,
Object userInfo,
Class userInfoClass,
boolean repeats)
Deprecated. Creates a timer which will fire at fireDate, and at
intervals ti thereafter (if repeats is true). |
|
| Method Summary | |
|---|---|
boolean |
equals(Object aTimer)
Deprecated. Return true if aTimer is an instance of WOTimer with
the same selector, target, and
userInfo as the receiver. |
void |
fire()
Deprecated. Fires the timer, invoking selector on target and passing
either the WOTimer -- if userInfoClass was null when the
WOTimer was created -- or userInfo. |
NSTimestamp |
fireDate()
Deprecated. Return the NSTimestamp at which the WOTimer will first fire. |
int |
hashCode()
Deprecated. |
void |
invalidate()
Deprecated. Unschedules the timer and marks it as invalid. |
boolean |
isValid()
Deprecated. Returns whether or not the timer is valid. |
void |
schedule()
Deprecated. Schedule the WOTimer to be fired. |
static WOTimer |
scheduledTimer(long ti,
Object aTarget,
String aSelectorName,
Object userInfo,
boolean repeats)
Deprecated. Creates a timer which will fire after ti milliseconds, and at
intervals ti thereafter (if repeats is true). |
static WOTimer |
scheduledTimer(long ti,
Object aTarget,
String aSelectorName,
Object anArgument,
Class anArgumentClass,
boolean repeats)
Deprecated. Creates a timer which will fire after ti milliseconds, and at
intervals ti thereafter (if repeats is true). |
NSSelector |
selector()
Deprecated. Returns the NSSelector which will be invoked when the WOTimer fires. |
Object |
target()
Deprecated. Returns the object on which selector will be invoked when the WOTimer fires. |
double |
timeInterval()
Deprecated. Return the interval in seconds at which the WOTimer will repeat firing. |
String |
toString()
Deprecated. |
Object |
userInfo()
Deprecated. Returns the userInfo object that was passed when the timer was created. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WOTimer(long ti,
Object aTarget,
String aSelectorName,
Object userInfo,
Class userInfoClass,
boolean repeats)
ti milliseconds, and at
intervals ti thereafter (if repeats is true).
If userInfoClass is null,
aSelectorName must take an object of class WOTimer as a
parameter, and userInfo will be available to the selector
invoking userInfo on the parameter timer. Otherwise,
aSelectorName must take an object of class userInfoClass
and userInfo must be an object of this class.
ti - the interval in milliseconds between successive firings of the timeraTarget - the method on which aSelectorName will be invokedaSelectorName - the method to be invoked when the timer firesuserInfo - user information that should be passed on when the timer firesuserInfoClass - the class of userInforepeats - whether or not the timer should fire repeatedlyWOTimer.WOTimer(NSTimestamp fireDate, long ti, Object aTarget, String aSelectorName, Object userInfo, Class userInfoClass, boolean repeats)
public WOTimer(NSTimestamp fireDate,
long interval,
Object aTarget,
String aSelectorName,
Object userInfo,
Class userInfoClass,
boolean repeats)
fireDate, and at
intervals ti thereafter (if repeats is true).
If userInfoClass is null,
aSelectorName must take an object of class WOTimer as a
parameter, and userInfo will be available to the selector
invoking userInfo on the parameter timer. Otherwise,
aSelectorName must take an object of class userInfoClass
and userInfo must be an object of this class.
fireDate - the time at which the timer should first fireinterval - the interval in milliseconds between successive firings of the timeraTarget - the method on which aSelectorName will be invokedaSelectorName - the method to be invoked when the timer firesuserInfo - user information that should be passed on when the timer firesuserInfoClass - the class of userInforepeats - whether or not the timer should fire repeatedlyWOTimer.WOTimer(long ti, Object aTarget, String aSelectorName, Object userInfo, Class userInfoClass, boolean repeats)| Method Detail |
|---|
public static WOTimer scheduledTimer(long ti,
Object aTarget,
String aSelectorName,
Object userInfo,
boolean repeats)
ti milliseconds, and at
intervals ti thereafter (if repeats is true).
aSelectorName must take an object of class WOTimer as a
parameter, and userInfo will be available to the selector
invoking userInfo on the parameter timer.
ti - the interval in milliseconds between successive firings of the timeraTarget - the method on which aSelectorName will be invokedaSelectorName - the method to be invoked when the timer firesuserInfo - user information that should be passed on when the timer firesrepeats - whether or not the timer should fire repeatedly
true if the timer was scheduled successfully, false otherwiseWOTimer.WOTimer(long ti, Object aTarget, String aSelectorName, Object userInfo, Class userInfoClass, boolean repeats)
public static WOTimer scheduledTimer(long ti,
Object aTarget,
String aSelectorName,
Object anArgument,
Class anArgumentClass,
boolean repeats)
ti milliseconds, and at
intervals ti thereafter (if repeats is true).
If anArgumentClass is null,
aSelectorName must take an object of class WOTimer as a
parameter, and userInfo will be available to the selector
invoking userInfo on the parameter timer. Otherwise,
aSelectorName must take an object of class anArgumentClass
and anArgument must be an object of this class.
ti - the interval in milliseconds between successive firings of the timeraTarget - the method on which aSelectorName will be invokedaSelectorName - the method to be invoked when the timer firesanArgument - parmeter that will be passed to aSelectorName when it is invokedanArgumentClass - the class of anArgumentrepeats - whether or not the timer should fire repeatedly
true if the timer was scheduled successfully, false otherwiseWOTimer.WOTimer(long ti, Object aTarget, String aSelectorName, Object userInfo, Class userInfoClass, boolean repeats)public void fire()
selector on target and passing
either the WOTimer -- if userInfoClass was null when the
WOTimer was created -- or userInfo.
WOTimer.selector(),
WOTimer.target(),
WOTimer.userInfo()public NSTimestamp fireDate()
public double timeInterval()
public void invalidate()
WOTimer.schedule()public boolean isValid()
true if the timer is validpublic Object userInfo()
userInfo object that was passed when the timer was created.
userInfo object that was passed when the timer was createdpublic Object target()
selector will be invoked when the WOTimer fires.
selector will be invokedWOTimer.selector()public NSSelector selector()
public void schedule()
WOTimer.invalidate()public String toString()
toString in class Objectpublic boolean equals(Object aTimer)
aTimer is an instance of WOTimer with
the same selector, target, and
userInfo as the receiver.
equals in class ObjectaTimer - the timer to be compared
true if the objects are equalWOTimer.selector(),
WOTimer.target(),
WOTimer.userInfo()public int hashCode()
hashCode in class Object
|
Last updated June 2008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||