Class BackgroundSupport

java.lang.Object
uk.ac.manchester.spinnaker.alloc.web.BackgroundSupport
Direct Known Subclasses:
SpallocServiceImpl

public abstract class BackgroundSupport extends Object
Enables a web service class to move processing a request into a background task easily.
Author:
Donal Fellows
  • Constructor Details

    • BackgroundSupport

      public BackgroundSupport()
  • Method Details

    • bgAction

      protected void bgAction(jakarta.ws.rs.container.AsyncResponse response, BackgroundSupport.BackgroundAction action)
      Run the action in the background and wrap it into the response when it completes.
      Parameters:
      response - The asynchronous response.
      action - The action that generates a Response
    • bgAction

      protected void bgAction(jakarta.ws.rs.container.AsyncResponse response, Permit permit, BackgroundSupport.BackgroundAction action)
      Run the action in the background and wrap it into the response when it completes.
      Parameters:
      response - The asynchronous response.
      permit - The permissions granted to the asynchronous task from the context that asked for it to happen.
      action - The action that generates a Response
    • fgAction

      protected static void fgAction(jakarta.ws.rs.container.AsyncResponse response, BackgroundSupport.BackgroundAction action)
      Run the action immediately and wrap it into the response.
      Parameters:
      response - The asynchronous response.
      action - The action that generates a Response