Oracle Fusion Middleware
Oracle WebLogic Server 10.3.1 API Reference
11g Release 1 (10.3.1)

Part Number E13941-02

weblogic.time.common
Interface ScheduleDef

All Superinterfaces:
Schedulable

Deprecated. As of WebLogic Server 7.0, replaced by Timer.

public interface ScheduleDef
extends Schedulable

Extended interface for user-written schedulers. A ScheduleDef object differs from a Schedulable in that it can be initialized with a ParamSet, and has access to WebLogic services. This makes it particularly suitable for T3Clients that instantiate scheduled triggers on the WebLogic Server. Since the object is constructed remotely via its default constructor, any initial state information must be supplied via the initialization method scheduleInit(). Parameters are supplied via the weblogic.common.time.Scheduler wrapper object.

Here's an example of a simple implementation of this interface.

package tutorial.time;
 import weblogic.common.*;
 import java.util.*;

 class TimeTest implements ScheduleDef, Triggerable {

 private int interval = 0;
 private T3ServicesDef services;

 public void setServices(T3ServicesDef services) {
   this.services = services;
 }

 public void scheduleInit(ParamSet ps) throws ParamSetException {
   interval = ps.getParam("interval").asInt();
 }

 public long schedule(long currentMillis) {
   return currentMillis + interval;
 }

 // Triggerable
 public void trigger() {
   System.out.println("trigger called");
 }

A ScheduleDef object can access other WebLogic services via the services stub passed to the user-defined setServices() method.

To set up a regularly repeating schedule, use the TimeRepeat object, a utility implementation of Schedulable, that is provided with this API.

See Also:
Scheduler, Trigger, TimeServicesDef, TimeRepeat

Method Summary
 void scheduleInit(ParamSet params)
          Deprecated. Deprecated in WebLogic Server 6.1
 void setServices(T3ServicesDef services)
          Deprecated. Deprecated in WebLogic Server 6.1
 
Methods inherited from interface weblogic.time.common.Schedulable
schedule
 

Method Detail

setServices

void setServices(T3ServicesDef services)
Deprecated. Deprecated in WebLogic Server 6.1

Sets the services stub, which allows runtime access to WebLogic services that may be accessed. Since this object is set at instantiation, the services object may reference either a client-side or a server-side implementation, depending upon the runtime context.

Parameters:
services - T3ServicesDef object

scheduleInit

void scheduleInit(ParamSet params)
Deprecated. Deprecated in WebLogic Server 6.1

Passes a set of initialization parameters to the ScheduleDef object. Since dynamically loaded classes cannot pass arguments in a constructor, this method is used to pass registration parameters to the newly-constructed ScheduleDef object.

Parameters:
ParamSet - of name/value pairs
Throws:
ParamSetException - if the ParamSet cannot be found or is invalid

Documentation is available at
http://download.oracle.com/docs/cd/E12839_01/web.1111/wls.htm
Copyright 1996, 2009, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server 10.3.1 API Reference
11g Release 1 (10.3.1)

Part Number E13941-02