Class JobSessions

java.lang.Object
com.kingsrook.qqq.backend.core.jobs.JobSessions

public final class JobSessions extends Object
Identity for durable jobs (spec section 2.10, R5). At launch the kernel captures the launching session's security key values. At every claim the worker builds a fresh session for the job's user with the app's createAutomatedSessionForUser (so CURRENT permissions apply - a user who lost access fails the job), then INTERSECTS its security keys with the captured ones, so a job never has more access than when it was submitted, and sets the job's client channel (so audits carry e.g. assistant/turnId).
  • Method Details

    • captureScope

      public static Map<String,List<Serializable>> captureScope(QSession session)
      What a launch captures from the session: its security key values (minus the jobs keys, which are derived) as a JSON-able map.
    • forJob

      public static QSession forJob(QInstance instance, QRecord job) throws QException
      Build the session a job's chunk runs under. Throws QPermissionDeniedException when the user's session cannot be established.
      Throws:
      QException