org.mobicents.servlet.sip.core.timers
Class StandardSasTimerTask

java.lang.Object
  extended by java.util.TimerTask
      extended by org.mobicents.servlet.sip.core.timers.StandardSasTimerTask
All Implemented Interfaces:
java.lang.Runnable, SipApplicationSessionTimerTask

public class StandardSasTimerTask
extends java.util.TimerTask
implements SipApplicationSessionTimerTask

Timer task that will notify the listeners that the sip application session has expired It is an improved timer task that is delayed every time setLastAccessedTime is called on it. It is delayed of lastAccessedTime + lifetime

Author:
Jean Deruelle

Constructor Summary
StandardSasTimerTask(MobicentsSipApplicationSession mobicentsSipApplicationSession)
           
 
Method Summary
 boolean cancel()
           
 long getDelay()
          Returns the delay in milliseconds before the session is due to expire or a negative value if it has already passed the time it should have expired
 MobicentsSipApplicationSession getSipApplicationSession()
          Retrieve the sip application Session associated with the timer task
 void run()
           
 void setSipApplicationSession(MobicentsSipApplicationSession sipApplicationSession)
          Set the sip application Session associated with the timer task
 
Methods inherited from class java.util.TimerTask
scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardSasTimerTask

public StandardSasTimerTask(MobicentsSipApplicationSession mobicentsSipApplicationSession)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

cancel

public boolean cancel()
Overrides:
cancel in class java.util.TimerTask

getDelay

public long getDelay()
Description copied from interface: SipApplicationSessionTimerTask
Returns the delay in milliseconds before the session is due to expire or a negative value if it has already passed the time it should have expired

Specified by:
getDelay in interface SipApplicationSessionTimerTask
Returns:

setSipApplicationSession

public void setSipApplicationSession(MobicentsSipApplicationSession sipApplicationSession)
Description copied from interface: SipApplicationSessionTimerTask
Set the sip application Session associated with the timer task

Specified by:
setSipApplicationSession in interface SipApplicationSessionTimerTask
Parameters:
sipApplicationSession - the sipApplicationSession to set

getSipApplicationSession

public MobicentsSipApplicationSession getSipApplicationSession()
Description copied from interface: SipApplicationSessionTimerTask
Retrieve the sip application Session associated with the timer task

Specified by:
getSipApplicationSession in interface SipApplicationSessionTimerTask
Returns:
the sipApplicationSession


Copyright © 2010. All Rights Reserved.