Class BackgroundSupport
java.lang.Object
uk.ac.manchester.spinnaker.alloc.web.BackgroundSupport
- Direct Known Subclasses:
- SpallocServiceImpl
Enables a web service class to move processing a request into a background
 task easily.
- Author:
- Donal Fellows
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static interfaceAn action that produces a response, usually handled asynchronously.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidbgAction(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.protected voidbgAction(jakarta.ws.rs.container.AsyncResponse response, BackgroundSupport.BackgroundAction action) Run the action in the background and wrap it into the response when it completes.protected static voidfgAction(jakarta.ws.rs.container.AsyncResponse response, BackgroundSupport.BackgroundAction action) Run the action immediately and wrap it into the response.
- 
Constructor Details- 
BackgroundSupportpublic BackgroundSupport()
 
- 
- 
Method Details- 
bgActionprotected 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
 
- 
bgActionprotected 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
 
- 
fgActionprotected 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
 
 
-