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 theSubjectAwareExecutorService
but additionally supports theScheduledExecutorService
interface.
-
-
Constructor Summary
Constructors Constructor Description SubjectAwareScheduledExecutorService()
SubjectAwareScheduledExecutorService(ScheduledExecutorService target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduledExecutorService
getTargetScheduledExecutorService()
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)
void
setTargetExecutor(Executor targetExecutor)
Sets target Executor instance that will actually execute the subject-associated Runnable instances.void
setTargetExecutorService(ExecutorService targetExecutorService)
void
setTargetScheduledExecutorService(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:SubjectAwareExecutor
Sets target Executor instance that will actually execute the subject-associated Runnable instances.- Overrides:
setTargetExecutor
in classSubjectAwareExecutorService
- Parameters:
targetExecutor
- the target Executor instance that will actually execute the subject-associated Runnable instances.
-
setTargetExecutorService
public void setTargetExecutorService(ExecutorService targetExecutorService)
- Overrides:
setTargetExecutorService
in classSubjectAwareExecutorService
-
schedule
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
- Specified by:
schedule
in interfaceScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
- Specified by:
schedule
in interfaceScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
- Specified by:
scheduleAtFixedRate
in interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
- Specified by:
scheduleWithFixedDelay
in interfaceScheduledExecutorService
-
-