public Runnable associateWith(Runnable runnable) {
        if (runnable instanceof Thread) {
            String msg = "This implementation does not support Thread arguments because of JDK ThreadLocal "
                    + "inheritance mechanisms required by Shiro.  Instead, the method argument should be a non-Thread "
                    + "Runnable and the return value from this method can then be given to an ExecutorService or "
                    + "another Thread.";
            throw new UnsupportedOperationException(msg);
        }
        return new SubjectRunnable(this, runnable);
    }
Returns {@code true} if this Subject is allowed to create sessions, {@code false} otherwise.

@return {@code true} if this Subject is allowed to create sessions, {@code false} otherwise.
@since 1.2
core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java