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 boolean
completeUpload
(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.void
initialize
(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, ornull
to 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
null
if 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:
true
if the action was success
-
getTransientStore
TransientStore getTransientStore()Gets the transient store used by this batch handler.- Since:
- 10.10
-