Package org.aksw.commons.io.process.pipe
Class PipeTransformRx
- java.lang.Object
-
- org.aksw.commons.io.process.pipe.PipeTransformRx
-
public class PipeTransformRx extends Object
RxWrapper for pipe transforms 'Polyfills' the path-based operations (mapStreamToPath, mapPathToStream, mapPathtoPath) using mapStreamToStream.- Author:
- raven
-
-
Field Summary
Fields Modifier and Type Field Description protected PipeTransformpipeTransform
-
Constructor Summary
Constructors Constructor Description PipeTransformRx(PipeTransform pipeTransform)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PipeTransformRxfromSysCallStreamToStream(String... args)io.reactivex.rxjava3.core.SingleTransformer<Path,InputStream>mapPathToStream()io.reactivex.rxjava3.core.SingleTransformer<InputStream,Path>mapStreamToPath(Path path)io.reactivex.rxjava3.core.SingleTransformer<InputStream,InputStream>mapStreamToStream()static <T,V>
io.reactivex.rxjava3.core.Single<V>singleFromCompletableFuture(java.util.function.Supplier<T> objSupplier, java.util.function.Function<? super T,? extends CompletableFuture<V>> getFuture, org.aksw.commons.lambda.throwing.ThrowingConsumer<? super T> cancelAction)static io.reactivex.rxjava3.core.Single<Path>singleFromFileCreation(java.util.function.Supplier<FileCreation> fileCreationSupplier)If the file creation completed successfully, further subscriptions to the single should return the cached path to the file instead of starting the creation again
-
-
-
Field Detail
-
pipeTransform
protected PipeTransform pipeTransform
-
-
Constructor Detail
-
PipeTransformRx
public PipeTransformRx(PipeTransform pipeTransform)
-
-
Method Detail
-
mapStreamToStream
public io.reactivex.rxjava3.core.SingleTransformer<InputStream,InputStream> mapStreamToStream()
-
mapStreamToPath
public io.reactivex.rxjava3.core.SingleTransformer<InputStream,Path> mapStreamToPath(Path path)
-
mapPathToStream
public io.reactivex.rxjava3.core.SingleTransformer<Path,InputStream> mapPathToStream()
-
singleFromFileCreation
public static io.reactivex.rxjava3.core.Single<Path> singleFromFileCreation(java.util.function.Supplier<FileCreation> fileCreationSupplier)
If the file creation completed successfully, further subscriptions to the single should return the cached path to the file instead of starting the creation again- Parameters:
fc-- Returns:
-
singleFromCompletableFuture
public static <T,V> io.reactivex.rxjava3.core.Single<V> singleFromCompletableFuture(java.util.function.Supplier<T> objSupplier, java.util.function.Function<? super T,? extends CompletableFuture<V>> getFuture, org.aksw.commons.lambda.throwing.ThrowingConsumer<? super T> cancelAction)
-
fromSysCallStreamToStream
public static PipeTransformRx fromSysCallStreamToStream(String... args)
-
-