Example usage for org.apache.shiro.subject.support SubjectRunnable SubjectRunnable

List of usage examples for org.apache.shiro.subject.support SubjectRunnable SubjectRunnable

Introduction

In this page you can find the example usage for org.apache.shiro.subject.support SubjectRunnable SubjectRunnable.

Prototype

protected SubjectRunnable(ThreadState threadState, Runnable delegate) throws IllegalArgumentException 

Source Link

Document

Creates a new SubjectRunnable that, when executed, will perform thread state ThreadState#bind binding and guaranteed ThreadState#restore restoration before and after the Runnable Runnable 's execution, respectively.

Usage

From source file:org.sonatype.nexus.security.subject.FakeAlmightySubject.java

License:Open Source License

@Override
public Runnable associateWith(final Runnable runnable) {
    return new SubjectRunnable(this, runnable);
}