Package org.silverpeas.core.thread.task
Interface AbstractRequestTask.Request<C>
-
- All Known Implementing Classes:
AbstractBackgroundProcessRequest
,AbstractRequest
,RunnableBackgroundProcess
- Enclosing class:
- AbstractRequestTask<C extends AbstractRequestTask.ProcessContext>
public static interface AbstractRequestTask.Request<C>
Each request must define a method called process which will process the request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
getReplacementId()
Gets a replacement identifier.void
process(C context)
Process the request according to the given context.
-
-
-
Method Detail
-
getReplacementId
default String getReplacementId()
Gets a replacement identifier.In almost cases, it will be null and means there is no replacement to perform into queue.
In rare cases, it will not be null and means that if it exists already a request into queue with a same identifier then this request must be replaced by the new one.
- Returns:
- a string representing a unique type. If null, the request behavior is the one of
simple
AbstractRequestTask.Request
.
-
process
void process(C context) throws InterruptedException
Process the request according to the given context.- Parameters:
context
- the context of the process.- Throws:
InterruptedException
- in case of technical error.
-
-