org.mobicents.media.server.impl.clock
Class TimerImpl

java.lang.Object
  extended by org.mobicents.media.server.impl.clock.TimerImpl
All Implemented Interfaces:
org.mobicents.media.server.spi.SyncSource, org.mobicents.media.server.spi.Timer

public class TimerImpl
extends java.lang.Object
implements org.mobicents.media.server.spi.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.
 long getTimestamp()
          (Non Java-doc.)
 void setHeartBeat(int heartBeat)
          Modify interval between timer tick
 void start()
          (Non Java-doc.)
 void stop()
          (Non Java-doc.)
 void sync(org.mobicents.media.MediaSource mediaSource)
          (Non Java-doc.)
 void unsync(org.mobicents.media.MediaSource mediaSource)
          (Non Java-doc.)
 
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 org.mobicents.media.server.spi.Timer
Returns:
the int value in milliseconds.

setHeartBeat

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

Specified by:
setHeartBeat in interface org.mobicents.media.server.spi.Timer
Parameters:
heartBeat - the new value of interval in milliseconds.

getTimestamp

public long getTimestamp()
(Non Java-doc.)

Specified by:
getTimestamp in interface org.mobicents.media.server.spi.SyncSource
See Also:
SyncSource.getTimestamp()

sync

public void sync(org.mobicents.media.MediaSource mediaSource)
          throws java.lang.IllegalArgumentException
(Non Java-doc.)

Specified by:
sync in interface org.mobicents.media.server.spi.SyncSource
Throws:
java.lang.IllegalArgumentException
See Also:
SyncSource.sync(org.mobicents.media.MediaSource)

unsync

public void unsync(org.mobicents.media.MediaSource mediaSource)
(Non Java-doc.)

Specified by:
unsync in interface org.mobicents.media.server.spi.SyncSource
See Also:
SyncSource.unsync(org.mobicents.media.MediaSource)

start

public void start()
(Non Java-doc.)

Specified by:
start in interface org.mobicents.media.server.spi.SyncSource
See Also:
SyncSource.start()

stop

public void stop()
(Non Java-doc.)

Specified by:
stop in interface org.mobicents.media.server.spi.SyncSource
See Also:
SyncSource.stop()


Copyright © 2010. All Rights Reserved.