|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Exteneded interface for user-written triggers. A TriggerDef object differs from a Triggerable in that it can be initialized with a ParamSet, and has access to T3Server 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 triggerInit(). Parameters are supplied via the weblogic.common.time.Trigger wrapper object.
Here's an example of a simple implementation of this interface.
package tutorial.time; import weblogic.common.*; import mypackage.MyConnection; import java.util.*; class TimeTest implements Schedulable, TriggerDef { private String username = ""; private T3ServicesDef services; public void setServices(T3ServicesDef services) { this.services = services; } public void triggerInit(ParamSet ps) throws ParamSetException { username = ps.getParam("username"); } public long schedule(long currentMillis) { return currentMillis + interval; } // TriggerDef public void trigger() { makeMyConnection(username); System.out.println("trigger called"); }
A TriggerDef object can access other WebLogic services via the services stub passed to the user-defined setServices() method.
Trigger
,
Schedulable
,
TimeServicesDef
Method Summary | |
void |
setServices(T3ServicesDef services)
Deprecated. Deprecated in WebLogic Server 6.1 |
void |
triggerInit(ParamSet params)
Deprecated. Deprecated in WebLogic Server 6.1 |
Methods inherited from interface weblogic.time.common.Triggerable |
trigger |
Method Detail |
public void setServices(T3ServicesDef services)
services
- T3ServicesDef objectpublic void triggerInit(ParamSet params) throws ParamSetException
ParamSet
- of name/value pairs
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81b |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |