org.echarts.servlet.sip
Class TransitionTimerManager

java.lang.Object
  extended by org.echarts.servlet.sip.TransitionTimerManager
All Implemented Interfaces:
java.util.EventListener, TimerListener, TransitionTimerManager

public class TransitionTimerManager
extends java.lang.Object
implements TransitionTimerManager, TimerListener

This class provides a way for ECharts to manage timers in a SIP Servlet environment. ECharts calls activateTransition() and deactivateTransition(), and this class uses the TimerService mechanism defined in the Sip Servlet API to handle the required timing tasks.


Constructor Summary
TransitionTimerManager()
           
 
Method Summary
 void activateTransition(TransitionTimerPort port)
          If port not currently activated then activate it, otherwise ignore the port.
 void deactivateTransition(TransitionTimerPort port)
          Deactivate transition with specified port if port currently activated.
 void reactivateTransition(TransitionTimerPort port)
          If port currently activated then deactivate it, and then activate it.
 void timeout(ServletTimer timer)
          Called by container when the timeout expires (TimerListener interface)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransitionTimerManager

public TransitionTimerManager()
Method Detail

activateTransition

public void activateTransition(TransitionTimerPort port)
                        throws java.lang.Exception
If port not currently activated then activate it, otherwise ignore the port. Ignore ports whose durations are less than 0.

Specified by:
activateTransition in interface TransitionTimerManager
Throws:
java.lang.Exception

reactivateTransition

public void reactivateTransition(TransitionTimerPort port)
                          throws java.lang.Exception
If port currently activated then deactivate it, and then activate it. If port currently deactivated then activate it.

Specified by:
reactivateTransition in interface TransitionTimerManager
Throws:
java.lang.Exception

deactivateTransition

public final void deactivateTransition(TransitionTimerPort port)
Deactivate transition with specified port if port currently activated.

Specified by:
deactivateTransition in interface TransitionTimerManager

timeout

public void timeout(ServletTimer timer)
Called by container when the timeout expires (TimerListener interface)

Specified by:
timeout in interface TimerListener