org.mobicents.media.server.testsuite.general
Class TimerImpl

java.lang.Object
  extended by org.mobicents.media.server.testsuite.general.TimerImpl
All Implemented Interfaces:
Timer

public class TimerImpl
extends java.lang.Object
implements Timer

Provides repited execution at a reqular time intervals.

Author:
Oleg Kulikov

Field Summary
static int _DEFAULT_T_PRIORITY
           
 
Constructor Summary
TimerImpl()
          Creates new instance of the timer.
 
Method Summary
 int getHeartBeat()
          Gets value of interval between timer ticks.
 void setHeartBeat(int heartBeat)
          Modify interval between timer tick
 java.util.concurrent.ScheduledFuture synchronize(java.lang.Runnable task)
          Synchronizes task from this timer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_DEFAULT_T_PRIORITY

public static final int _DEFAULT_T_PRIORITY
See Also:
Constant Field Values
Constructor Detail

TimerImpl

public TimerImpl()
Creates new instance of the timer.

Method Detail

getHeartBeat

public int getHeartBeat()
Gets value of interval between timer ticks.

Specified by:
getHeartBeat in interface Timer
Returns:
the int value in milliseconds.

setHeartBeat

public void setHeartBeat(int heartBeat)
Modify interval between timer tick

Specified by:
setHeartBeat in interface Timer
Parameters:
heartBeat - the new value of interval in milliseconds.

synchronize

public java.util.concurrent.ScheduledFuture synchronize(java.lang.Runnable task)
Synchronizes task from this timer.

Specified by:
synchronize in interface Timer
Parameters:
task - the task to be synchronized.
Returns:
the action which can be canceled to unsynchronize previously synchronized task


Copyright © 2009. All Rights Reserved.