|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Timer
.
Interface that defines a time service factory. Use this interface to schedule a recurring action, as shown in this example, which illustrates a recurring trigger established from a T3Client, but schedule and executed on a WebLogic Server.
ParamSet schedParams = new ParamSet(); schedParams.setParam("interval", 10000); // 10 seconds Scheduler scheduler = new Scheduler("tutorial.time.TimeTest", schedParams); Trigger trigger = new Trigger("tutorial.time.TimeTest"); ScheduledTriggerDef std = t3.services.time() .getScheduledTrigger(scheduler, trigger)
Note that the Scheduler implements ScheduleDef, rather than Schedulable, so that its setServices() and scheduleInit() methods will be called; also the Trigger implements Triggerable for the same reason. The Schedule and Trigger wrapper objects in this case merely hold the name of the target server-side class and its parameters.
You may also pass client-side objects to these constructors, in which case the trigger is created and used exclusively from within the client's VM.
Schedulable
,
ScheduleDef
,
Triggerable
,
TriggerDef
Method Summary | |
long |
currentTimeMillis()
Deprecated. Deprecated in WebLogic Server 6.1 |
int |
getLocalClockOffsetMillis()
Deprecated. Deprecated in WebLogic Server 6.1 |
int |
getRoundTripDelayMillis()
Deprecated. Deprecated in WebLogic Server 6.1 |
ScheduledTriggerDef |
getScheduledTrigger(Schedulable scheduler,
Triggerable trigger)
Deprecated. Deprecated in WebLogic Server 6.1 |
ScheduledTriggerDef |
getScheduledTrigger(Scheduler scheduler,
Trigger trigger)
Deprecated. Deprecated in WebLogic Server 6.1 |
Method Detail |
public ScheduledTriggerDef getScheduledTrigger(Schedulable scheduler, Triggerable trigger) throws TimeTriggerException
The getScheduledTrigger() method returns a ScheduledTriggerDef object. To initiate execution, call the ScheduledTriggerDef's schedule() method. To cancel future execution, call its cancel() method, or return 0 from its schedule() method.
The Schedulable object passed as an argument to this method may implement either Schedulable or ScheduleDef. The Trigger object may implement either Triggerable or TriggerDef.
scheduler
- Object that implements a schedule() methodtrigger
- Object that implements a trigger() methodScheduledTriggerDef
public ScheduledTriggerDef getScheduledTrigger(Scheduler scheduler, Trigger trigger) throws TimeTriggerException
If the supplied classes also implement ScheduleDef or TriggerDef, you can parameters to the Scheduler and Trigger constructors via calls to scheduleInit() and triggerInit(). Their setServices() method will also be called, for access to WebLogic services.
The getScheduledTrigger() method returns a ScheduledTriggerDef object. To initiate execution, call its the ScheduledTriggerDef's schedule() method. To cancel future execution, call its cancel() method.
scheduler
- Wrapper for a Schedulable or ScheduleDef
class name and (optionally) a ParamSet for
initializationtrigger
- Wrapper for a Triggerable or TriggerDef class name
and (optionally) a ParamSet for initialization.public long currentTimeMillis() throws T3Exception
Within the WebLogic Server, this is simply a wrapper for
public int getRoundTripDelayMillis() throws T3Exception
public int getLocalClockOffsetMillis() throws T3Exception
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |