com.emarson.lemonade.bluelemon.midp1
Class Timer

java.lang.Object
  extended by com.emarson.lemonade.bluelemon.midp1.Timer

public class Timer
extends Object

This class delivers the functionality of the MIDP1 Timer Java class to the Bluelemon environment.


Constructor Summary
Timer()
          Constructs a new, empty Timer object.
 
Method Summary
 void cancel()
          Terminates this timer, discarding any currently scheduled tasks.
 void schedule(BluelemonCode code, Number delay)
          Creates the instance of TimerTask to process the specified Bluelemon code and schedules it for execution after the specified delay.
 void schedule(BluelemonCode code, Number delay, Number period)
          Creates the instance of TimerTask to process the specified Bluelemon code and schedules it for repeated fixed-delay execution, beginning after the specified delay.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timer

public Timer()
Constructs a new, empty Timer object.

Usage examples:
     <blue:newInstance class="com/emarson/lemonade/bluelemon/midp1/Timer"
                       toVariable="timer"/>
 
Method Detail

cancel

public void cancel()
Terminates this timer, discarding any currently scheduled tasks.

See Also:
MIDP1 Timer
Usage examples:
     <blue:call object="timer" method="cancel"/>
 

schedule

public void schedule(BluelemonCode code,
                     Number delay)
Creates the instance of TimerTask to process the specified Bluelemon code and schedules it for execution after the specified delay.

Parameters:
code - Bluelemon code to process
delay - delay in milliseconds before task is to be executed
See Also:
MIDP1 Timer
Usage examples:
     <blue:call object="timer" method="schedule"/>
          <blue:argument type="byteArr" contextKey="scheduledAction"/>
            <blue:argument type="byte" name="100"/>
     </blue:call>
 

schedule

public void schedule(BluelemonCode code,
                     Number delay,
                     Number period)
Creates the instance of TimerTask to process the specified Bluelemon code and schedules it for repeated fixed-delay execution, beginning after the specified delay. Subsequent executions take place at approximately regular intervals separated by the specified period.

Parameters:
code - Bluelemon code to process
delay - delay in milliseconds before task is to be executed
period - time in milliseconds between successive task executions.
See Also:
MIDP1 Timer
Usage examples:
     <blue:call object="timer" method="schedule"/>
          <blue:argument type="byteArr" contextKey="scheduledAction"/>
            <blue:argument type="byte" name="0"/>
            <blue:argument type="byte" name="100"/>
     </blue:call>
 


Copyright © 2007 E-MARSON. All Rights Reserved.