Interface BatchHandler
- All Known Implementing Classes:
AbstractBatchHandler,DefaultBatchHandler,S3DirectBatchHandler
public interface BatchHandler
Batch Handler encapsulates functionality to handle Batch Upload behaviours.
- Since:
- 10.1
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancompleteUpload(String batchId, String fileIdx, BatchFileInfo fileInfo) Callback for the batch handler to execute post-upload actions.Attempts to fetch a batch with the given id.getName()Gets the batch handler's name.Gets the transient store used by this batch handler.voidinitialize(String name, Map<String, String> properties) Initializes this batch handler with the given name and configuration properties.Initiates a new batch with an optional externally provided id.refreshToken(String batchId) Attempts to renew the credentials associated to this batch handler.
-
Method Details
-
initialize
Initializes this batch handler with the given name and configuration properties.- Parameters:
name- the batch handler's nameproperties- the configuration properties
-
getName
String getName()Gets the batch handler's name.- Returns:
- the batch handler's name
-
newBatch
Initiates a new batch with an optional externally provided id.- Parameters:
batchId- the id to use for the batch, ornullto generate it- Returns:
- a newly created batch
-
getBatch
Attempts to fetch a batch with the given id.- Parameters:
batchId- the batch id to fetch- Returns:
- the batch with the given id, or
nullif not found
-
refreshToken
Attempts to renew the credentials associated to this batch handler. This is only typically used in third-party batch handlers.- Parameters:
batchId- the batch id- Returns:
- the new credentials
- Since:
- 11.1
-
completeUpload
Callback for the batch handler to execute post-upload actions. This is only typically used in third-party batch handlers.- Parameters:
batchId- the batch idfileIdx- the file index within the batchfileInfo- file information regarting the uploaded file- Returns:
trueif the action was success
-
getTransientStore
TransientStore getTransientStore()Gets the transient store used by this batch handler.- Since:
- 10.10
-