public class Timer extends Object
Constructor and Description |
---|
Timer(AbstractNativeFunction fn,
Context ctx,
long delay,
long interval,
FunctionRefCPEntry onTriggerFunction,
FunctionRefCPEntry onErrorFunction)
Triggers the timer.
|
public Timer(AbstractNativeFunction fn, Context ctx, long delay, long interval, FunctionRefCPEntry onTriggerFunction, FunctionRefCPEntry onErrorFunction) throws SchedulingException
ctx
- The ballerina context.delay
- The initial delay.interval
- The interval between two task executions.onTriggerFunction
- The main function which will be triggered by the task.onErrorFunction
- The function which will be triggered in the error situation.SchedulingException
public String getId()
public void stop() throws TaskException
TaskException
Copyright © 2018 WSO2. All rights reserved.