@Override
    public void setTargetExecutor(Executor targetExecutor) {
        if (!(targetExecutor instanceof ScheduledExecutorService)) {
            String msg = "The " + getClass().getName() + " implementation only accepts "
                    + ScheduledExecutorService.class.getName() + " target instances.";
            throw new IllegalArgumentException(msg);
        }
        super.setTargetExecutorService((ScheduledExecutorService) targetExecutor);
    }
Same concept as the {@link SubjectAwareExecutorService} but additionally supports the
{@link ScheduledExecutorService} interface.
core/src/main/java/org/apache/shiro/concurrent/SubjectAwareScheduledExecutorService.java