Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-140

Add a subject-aware ExecutorService implementation to support Subject execution on other threads

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.0
    • Component/s: Subject
    • Labels:
      None

      Description

      Currently the Subject.associateWith* methods return objects that are associated with the Subject. Then the caller is expected to dispatch the callable/runnable to some thread mechanism as they see fit.

      It might be nice to simplify this even further for anyone relying on the ExecutorService API, say by creating a SubjectExecutorService implementation that:

      1) Looks up the currently executing Subject
      2) calls subject.associateWith* methods on the callable/runnable argument
      3) dispatches the associated callable/runnable to the underlying 'real' ExecutorService instance.

      It reduces Shiro-user code complexity in that they don't need to call the subject.execute* or subject.associateWith* methods any time they need to dispatch to another thread.

        Attachments

          Activity

            People

            • Assignee:
              lhazlewood Les Hazlewood
              Reporter:
              lhazlewood Les Hazlewood
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h