Base interface for all Timer controls.
Syntax
package weblogic.jws.control;
public class TimerControl extends Control
Remarks
The methods of this interface may be invoked by any web service with
a Timer control instance.
Members
Constructors
None.
Methods
boolean getCoalesceEvents()
Returns the current value of the coalesce-events attribute.
String getRepeatsEvery()
Returns the current interval specified by the repeats-every
attribute of the @jws:timer tag or the most recent call to setRepeatsEvery.
long getTimeout()
Returns the current duration specified by the timeout
attribute of the @jws:timer tag of the most recent call to setTimeout.
Date getTimeoutAt()
Returns the time specified by the most recent call to
setTimeoutAt, or null.
void restart()
Resets the timer. Any pending event(s) is canceled. The
timer will subsequently expire after the repeats-every period has elasped
after this call.
void setCoalesceEvents(boolean
coalesce)
Enables or disables the coalesce-events behavior. See
Creating
a New Timer Control.
void setRepeatsEvery(long
seconds)
Sets the repeat interval for the timer using seconds since
the epoch.
void setRepeatsEvery(String
interval)
Sets the repeat interval using an xsd:duration string.
See Specifying
Time on a Timer Control.
void setTimeout(long
seconds)
Sets the time between start or restart and the first expiration
of the timer, in seconds.
void setTimeout(String
delay)
Sets the time between start or restart and the first expiration
of the timer, as an xsd:duration string. See
Specifying
Time on a Timer Control.
void setTimeoutAt(Date
time)
Sets the absolute date and time at which the timer will
expire the first time after being started or restarted.
void start()
Starts the timer. The first timer expiration will occur
after the period specified by timeout has elasped.
void stop()
Stops the timer. No further timer expiration callbacks
will be invoked.
Fields
none.
Events
void onTimeout(long
time)
When the timer expires, a callback handler with the name
<timer instance>_onTimeout, if present, is invoked. The time at
which the timer expired is passed as the time
parameter. Note that his may be some time in the past if the onTimeout
callback could not be invoked due to high system load.
Related Topics
Timer
Control: Using Timers in Your Web Service
SimpleTimer.jws Sample
AdvancedTimer.jws
Sample