Package org.apache.shiro.concurrent
Class SubjectAwareScheduledExecutorService
- java.lang.Object
-
- org.apache.shiro.concurrent.SubjectAwareExecutor
-
- org.apache.shiro.concurrent.SubjectAwareExecutorService
-
- org.apache.shiro.concurrent.SubjectAwareScheduledExecutorService
-
- All Implemented Interfaces:
Executor,ExecutorService,ScheduledExecutorService
public class SubjectAwareScheduledExecutorService extends SubjectAwareExecutorService implements ScheduledExecutorService
Same concept as theSubjectAwareExecutorServicebut additionally supports theScheduledExecutorServiceinterface.
-
-
Constructor Summary
Constructors Constructor Description SubjectAwareScheduledExecutorService()SubjectAwareScheduledExecutorService(ScheduledExecutorService target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduledExecutorServicegetTargetScheduledExecutorService()ScheduledFuture<?>schedule(Runnable command, long delay, TimeUnit unit)<V> ScheduledFuture<V>schedule(Callable<V> callable, long delay, TimeUnit unit)ScheduledFuture<?>scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)ScheduledFuture<?>scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)voidsetTargetExecutor(Executor targetExecutor)Sets target Executor instance that will actually execute the subject-associated Runnable instances.voidsetTargetExecutorService(ExecutorService targetExecutorService)voidsetTargetScheduledExecutorService(ScheduledExecutorService targetScheduledExecutorService)-
Methods inherited from class org.apache.shiro.concurrent.SubjectAwareExecutorService
associateWithSubject, associateWithSubject, awaitTermination, getTargetExecutorService, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
Methods inherited from class org.apache.shiro.concurrent.SubjectAwareExecutor
associateWithSubject, execute, getSubject, getTargetExecutor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
-
-
-
Constructor Detail
-
SubjectAwareScheduledExecutorService
public SubjectAwareScheduledExecutorService()
-
SubjectAwareScheduledExecutorService
public SubjectAwareScheduledExecutorService(ScheduledExecutorService target)
-
-
Method Detail
-
getTargetScheduledExecutorService
public ScheduledExecutorService getTargetScheduledExecutorService()
-
setTargetScheduledExecutorService
public void setTargetScheduledExecutorService(ScheduledExecutorService targetScheduledExecutorService)
-
setTargetExecutor
public void setTargetExecutor(Executor targetExecutor)
Description copied from class:SubjectAwareExecutorSets target Executor instance that will actually execute the subject-associated Runnable instances.- Overrides:
setTargetExecutorin classSubjectAwareExecutorService- Parameters:
targetExecutor- the target Executor instance that will actually execute the subject-associated Runnable instances.
-
setTargetExecutorService
public void setTargetExecutorService(ExecutorService targetExecutorService)
- Overrides:
setTargetExecutorServicein classSubjectAwareExecutorService
-
schedule
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
- Specified by:
schedulein interfaceScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
- Specified by:
schedulein interfaceScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
- Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
- Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService
-
-