Package io.activej.csp.process
Class AbstractChannelTransformer<S extends AbstractChannelTransformer<S,I,O>,I,O>
java.lang.Object
io.activej.csp.process.AbstractCommunicatingProcess
io.activej.csp.process.AbstractChannelTransformer<S,I,O>
- All Implemented Interfaces:
io.activej.async.process.AsyncCloseable,io.activej.async.process.AsyncProcess,ChannelConsumerTransformer<O,,ChannelConsumer<I>> ChannelSupplierTransformer<I,,ChannelSupplier<O>> ChannelTransformer<I,,O> HasChannelInput<I>,HasChannelOutput<O>,WithChannelInput<S,,I> WithChannelOutput<S,,O> WithChannelTransformer<S,I, O>
- Direct Known Subclasses:
ChannelByteChunker,ChannelByteRanger
public abstract class AbstractChannelTransformer<S extends AbstractChannelTransformer<S,I,O>,I,O>
extends AbstractCommunicatingProcess
implements WithChannelTransformer<S,I,O>
-
Field Summary
FieldsFields inherited from interface io.activej.async.process.AsyncCloseable
STATIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected final voidAn operation which is executed in case of manual closing.protected voidDescribes the main operations of the communicating process.getInput()protected voidprotected abstract @NotNull io.activej.promise.Promise<Void>protected io.activej.promise.Promise<Void>protected io.activej.promise.Promise<Void>protected final io.activej.promise.Promise<Void>protected final io.activej.promise.Promise<Void>Methods inherited from class io.activej.csp.process.AbstractCommunicatingProcess
afterProcess, close, closeEx, completeProcess, completeProcessEx, doSanitize, getProcessCompletion, isProcessComplete, isProcessStarted, sanitize, sanitize, sanitize, sanitize, startProcessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.activej.csp.dsl.WithChannelInput
withInputMethods inherited from interface io.activej.csp.dsl.WithChannelOutput
withOutputMethods inherited from interface io.activej.csp.dsl.WithChannelTransformer
transform, transform
-
Field Details
-
input
-
output
-
-
Constructor Details
-
AbstractChannelTransformer
public AbstractChannelTransformer()
-
-
Method Details
-
send
-
sendEndOfStream
-
onItem
-
onProcessFinish
-
onProcessStart
-
beforeProcess
protected void beforeProcess()- Overrides:
beforeProcessin classAbstractCommunicatingProcess
-
doProcess
protected void doProcess()Description copied from class:AbstractCommunicatingProcessDescribes the main operations of the communicating process. May include interaction between input (ChannelSupplier) and output (ChannelConsumer).- Specified by:
doProcessin classAbstractCommunicatingProcess
-
getInput
- Specified by:
getInputin interfaceHasChannelInput<S extends AbstractChannelTransformer<S,I, O>>
-
getOutput
- Specified by:
getOutputin interfaceHasChannelOutput<S extends AbstractChannelTransformer<S,I, O>>
-
doClose
Description copied from class:AbstractCommunicatingProcessAn operation which is executed in case of manual closing.- Specified by:
doClosein classAbstractCommunicatingProcess- Parameters:
e- an exception thrown on closing
-
onCleanup
protected void onCleanup()
-