NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.stack.timers
Class DefaultSipTimer

java.lang.Object
  extended by java.util.Timer
      extended by gov.nist.javax.sip.stack.timers.DefaultSipTimer
All Implemented Interfaces:
SipTimer

public class DefaultSipTimer
extends Timer
implements SipTimer

Default SIP Timer implementation based on java.util.Timer

Author:
jean.deruelle@gmail.com

Constructor Summary
DefaultSipTimer()
           
 
Method Summary
 boolean cancel(SIPStackTimerTask task)
          cancel a previously scheduled task
 boolean isStarted()
          Check if the timer is started or stopped
 boolean schedule(SIPStackTimerTask task, long delay)
          Schedule a new SIPStackTimerTask after the specified delay
 boolean scheduleWithFixedDelay(SIPStackTimerTask task, long delay, long period)
          Schedule a new SIPStackTimerTask after the specified delay
 void start(SipStackImpl sipStack, Properties configurationProperties)
          Start the SIP Timer, called when the stack is created.
 void stop()
          Stop the Timer (called when the stack is stop or reinitialized)
 
Methods inherited from class java.util.Timer
cancel, purge, schedule, schedule, schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSipTimer

public DefaultSipTimer()
Method Detail

schedule

public boolean schedule(SIPStackTimerTask task,
                        long delay)
Description copied from interface: SipTimer
Schedule a new SIPStackTimerTask after the specified delay

Specified by:
schedule in interface SipTimer
Parameters:
task - the task to schedule
delay - the delay in milliseconds to schedule the task
Returns:
true if the task was correctly scheduled, false otherwise

scheduleWithFixedDelay

public boolean scheduleWithFixedDelay(SIPStackTimerTask task,
                                      long delay,
                                      long period)
Description copied from interface: SipTimer
Schedule a new SIPStackTimerTask after the specified delay

Specified by:
scheduleWithFixedDelay in interface SipTimer
Parameters:
task - the task to schedule
delay - the delay in milliseconds to schedule the task
period - the period to run the task after it has been first scheduled
Returns:
true if the task was correctly scheduled, false otherwise

cancel

public boolean cancel(SIPStackTimerTask task)
Description copied from interface: SipTimer
cancel a previously scheduled task

Specified by:
cancel in interface SipTimer
Parameters:
task - task to cancel
Returns:
true if the task was cancelled, false otherwise

start

public void start(SipStackImpl sipStack,
                  Properties configurationProperties)
Description copied from interface: SipTimer
Start the SIP Timer, called when the stack is created. The stack configuration is passed so that different implementations can use specific config properties to configure themselves

Specified by:
start in interface SipTimer
Parameters:
sipStack - TODO
configurationProperties - the stack properties

stop

public void stop()
Description copied from interface: SipTimer
Stop the Timer (called when the stack is stop or reinitialized)

Specified by:
stop in interface SipTimer

isStarted

public boolean isStarted()
Description copied from interface: SipTimer
Check if the timer is started or stopped

Specified by:
isStarted in interface SipTimer
Returns:
true is the timer is started false otherwise

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.