Class DataContentChainBuilder.DefaultDataContentChainBuilder
java.lang.Object
zeroecho.sdk.builders.core.DataContentChainBuilder.DefaultDataContentChainBuilder
- All Implemented Interfaces:
DataContentChainBuilder
- Enclosing interface:
DataContentChainBuilder
public static final class DataContentChainBuilder.DefaultDataContentChainBuilder
extends Object
implements DataContentChainBuilder
Default implementation of
DataContentChainBuilder.
Maintains a reference to the tail of the content chain. Each added builder is
built in the specified encryption/decryption mode and connected via
DataContent.setInput(DataContent) to the previously built content.
-
Nested Class Summary
Nested classes/interfaces inherited from interface DataContentChainBuilder
DataContentChainBuilder.DefaultDataContentChainBuilder -
Method Summary
Modifier and TypeMethodDescriptionadd(DataContentBuilder<? extends DataContent> builder) Adds aDataContentBuilderto the chain and links its output to the input of the previously addedDataContent, if any.build()Finalizes the chain and returns the tailDataContentinstance.
-
Method Details
-
add
Description copied from interface:DataContentChainBuilderAdds aDataContentBuilderto the chain and links its output to the input of the previously addedDataContent, if any.The
DataContentproduced by this builder becomes the new tail of the chain.- Specified by:
addin interfaceDataContentChainBuilder- Parameters:
builder- the builder producing the nextDataContent; must not be null- Returns:
- this chain builder instance, allowing for fluent chaining
-
build
Description copied from interface:DataContentChainBuilderFinalizes the chain and returns the tailDataContentinstance.The returned content may internally reference earlier content via
DataContent.setInput(DataContent)chaining.- Specified by:
buildin interfaceDataContentChainBuilder- Returns:
- the last
DataContentin the chain, ornullif no builders were added
-