public interface ChainedUploadedFileProcessor extends UploadedFileProcessor
ChainedUploadedFileProcessor instances. A composite UploadedFileProcessor
is accessible from the RequestContext,
but will be invoked automatically by the framework as needed. Developers
can implement this interface and chain many of them up together using space
separated class names in trinidad-config.xml file under
uploaded-file-processor element. The order in which the processors
will be instantated and called will be the same as how it appears inside the element.
As such, it is expected that the input of the ChainedUploadedFileProcessor will be
the output of the last ChainedUploadedFileProcessor.
UploadedFileProcessors which implement this interface are subject to the following
limitations/abilities:
UploadedFileProcessor the UploadedFile objects given
to a chained UploadedFileProcessor should allow for multiple reads such that
UploadedFile.getInputStream() may be called multiple times and must return a
new InputStream every time it is called.
UploadedFile instances. They may,
instead, return the same instance as its predecessor, thus saving the need to move
content around with each call into the chain. If a ChainedUploadedFileProcessor
DOES return a new instance of UploadedFile, it must be allowed to be read multiple times.
ExtendedUploadedFileProcessor abstract
class. Any additional methods will be handled in accordance to the modifications listed above.
UploadedFileDEFAULT_MAX_CHUNK_SIZE, DEFAULT_MAX_DISK_SPACE, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_MEMORY, MAX_CHUNK_SIZE_PARAM_NAME, MAX_DISK_SPACE_PARAM_NAME, MAX_FILE_SIZE_PARAM_NAME, MAX_MEMORY_PARAM_NAME, TEMP_DIR_PARAM_NAMEinit, processFileCopyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.