public class Timer extends Object
Constructor and Description |
---|
Timer(Context ctx,
long delay,
long interval,
FunctionInfo onTriggerFunction,
FunctionInfo onErrorFunction)
Triggers the timer.
|
public Timer(Context ctx, long delay, long interval, FunctionInfo onTriggerFunction, FunctionInfo 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
- if cannot create the schedulerpublic String getId()
public void stop()
Copyright © 2018 WSO2. All rights reserved.