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

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

public class DefaultSasTimerTask
extends java.lang.Object
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

Field Summary
protected  java.util.concurrent.ScheduledFuture<MobicentsSipApplicationSession> expirationTimerFuture
           
 
Constructor Summary
DefaultSasTimerTask(MobicentsSipApplicationSession mobicentsSipApplicationSession)
           
 
Method Summary
 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
 java.util.concurrent.ScheduledFuture<MobicentsSipApplicationSession> getScheduledFuture()
           
 MobicentsSipApplicationSession getSipApplicationSession()
          Retrieve the sip application Session associated with the timer task
 void run()
           
 void setScheduledFuture(java.util.concurrent.ScheduledFuture<MobicentsSipApplicationSession> schedule)
           
 void setSipApplicationSession(MobicentsSipApplicationSession sipApplicationSession)
          Set the sip application Session associated with the timer task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expirationTimerFuture

protected transient java.util.concurrent.ScheduledFuture<MobicentsSipApplicationSession> expirationTimerFuture
Constructor Detail

DefaultSasTimerTask

public DefaultSasTimerTask(MobicentsSipApplicationSession mobicentsSipApplicationSession)
Method Detail

run

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

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

setScheduledFuture

public void setScheduledFuture(java.util.concurrent.ScheduledFuture<MobicentsSipApplicationSession> schedule)

getScheduledFuture

public java.util.concurrent.ScheduledFuture<MobicentsSipApplicationSession> getScheduledFuture()


Copyright © 2010. All Rights Reserved.