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

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by java.util.concurrent.ScheduledThreadPoolExecutor
              extended by org.mobicents.servlet.sip.core.timers.DefaultSipApplicationSessionTimerService
All Implemented Interfaces:
java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.ScheduledExecutorService, SipApplicationSessionTimerService

public class DefaultSipApplicationSessionTimerService
extends java.util.concurrent.ScheduledThreadPoolExecutor
implements SipApplicationSessionTimerService

Author:
jean.deruelle@gmail.com

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
DefaultSipApplicationSessionTimerService(int corePoolSize)
           
DefaultSipApplicationSessionTimerService(int corePoolSize, java.util.concurrent.RejectedExecutionHandler handler)
           
DefaultSipApplicationSessionTimerService(int corePoolSize, java.util.concurrent.ThreadFactory threadFactory)
           
DefaultSipApplicationSessionTimerService(int corePoolSize, java.util.concurrent.ThreadFactory threadFactory, java.util.concurrent.RejectedExecutionHandler handler)
           
 
Method Summary
 boolean cancel(SipApplicationSessionTimerTask expirationTimerTask)
           
 SipApplicationSessionTimerTask createSipApplicationSessionTimerTask(MobicentsSipApplicationSession sipApplicationSession)
           
 boolean isStarted()
           
 SipApplicationSessionTimerTask schedule(SipApplicationSessionTimerTask expirationTimerTask, long delay, java.util.concurrent.TimeUnit unit)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, remove, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, shutdown, shutdownNow, submit, submit, submit
 
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
 

Constructor Detail

DefaultSipApplicationSessionTimerService

public DefaultSipApplicationSessionTimerService(int corePoolSize)
Parameters:
corePoolSize -

DefaultSipApplicationSessionTimerService

public DefaultSipApplicationSessionTimerService(int corePoolSize,
                                                java.util.concurrent.ThreadFactory threadFactory)
Parameters:
corePoolSize -
threadFactory -

DefaultSipApplicationSessionTimerService

public DefaultSipApplicationSessionTimerService(int corePoolSize,
                                                java.util.concurrent.RejectedExecutionHandler handler)
Parameters:
corePoolSize -
handler -

DefaultSipApplicationSessionTimerService

public DefaultSipApplicationSessionTimerService(int corePoolSize,
                                                java.util.concurrent.ThreadFactory threadFactory,
                                                java.util.concurrent.RejectedExecutionHandler handler)
Parameters:
corePoolSize -
threadFactory -
handler -
Method Detail

createSipApplicationSessionTimerTask

public SipApplicationSessionTimerTask createSipApplicationSessionTimerTask(MobicentsSipApplicationSession sipApplicationSession)
Specified by:
createSipApplicationSessionTimerTask in interface SipApplicationSessionTimerService

cancel

public boolean cancel(SipApplicationSessionTimerTask expirationTimerTask)
Specified by:
cancel in interface SipApplicationSessionTimerService

schedule

public SipApplicationSessionTimerTask schedule(SipApplicationSessionTimerTask expirationTimerTask,
                                               long delay,
                                               java.util.concurrent.TimeUnit unit)
Specified by:
schedule in interface SipApplicationSessionTimerService

start

public void start()
Specified by:
start in interface SipApplicationSessionTimerService

stop

public void stop()
Specified by:
stop in interface SipApplicationSessionTimerService

isStarted

public boolean isStarted()
Specified by:
isStarted in interface SipApplicationSessionTimerService


Copyright © 2011. All Rights Reserved.