Package tv.hd3g.transfertfiles.filters
Interface DataExchangeFilter
-
- All Known Implementing Classes:
DataExchangeFilterCompress,DataExchangeFilterDecompress,DataExchangeFilterHashExtraction,DataExchangeFilterInputStream,DataExchangeFilterOutputStream
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface DataExchangeFilter
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_BUFFER_SIZE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BufferVaultapplyDataFilter(boolean last, BufferVault dataSources)default intensureMinDataSourcesDataLength()Ensure to all applyDataFilter call will contain a total dataSources size equals/more than with this value.default StringgetFilterName()default voidonCancelTransfert()
-
-
-
Field Detail
-
DEFAULT_BUFFER_SIZE
static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
applyDataFilter
BufferVault applyDataFilter(boolean last, BufferVault dataSources) throws IOException
- Parameters:
dataSource- can be empty after calllast- if true, you should use flush/close internal needs and return last responses, because applyDataFilter will never be called for the current instance.- Returns:
- empty for "ignore" filter/data collector filter null for stop data transfert operation returned BufferVault can be re-used here after, and can be empty after call
- Throws:
IOException
-
onCancelTransfert
default void onCancelTransfert()
-
ensureMinDataSourcesDataLength
default int ensureMinDataSourcesDataLength()
Ensure to all applyDataFilter call will contain a total dataSources size equals/more than with this value. Else applyDataFilter with last = true will be called- Returns:
- byte count
-
getFilterName
default String getFilterName()
-
-